Skip to content

Commit

Permalink
Merge branch 'master' into aaliddell-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
aaliddell authored Mar 28, 2020
2 parents 18912e4 + 1d4325c commit b087511
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .ci/travis-before-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if [[ "${TRAVIS_OS_NAME}" == "linux" && "${BUILD}" == *wheels* ]]; then
fi
fi

sudo service postgresql start ${PGVERSION}
sudo pg_ctlcluster ${PGVERSION} main restart
fi

if [ "${TRAVIS_OS_NAME}" == "osx" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ matrix:
# Also use this job to publish the releases and build
# the documentation.
- os: linux
dist: xenial
dist: bionic
sudo: required
language: python
python: "3.6"
Expand Down
2 changes: 1 addition & 1 deletion asyncpg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
# snapshots will automatically include the git revision
# in __version__, for example: '0.16.0.dev0+ge06ad03'

__version__ = '0.20.0'
__version__ = '0.20.1'
2 changes: 1 addition & 1 deletion asyncpg/pgproto
21 changes: 19 additions & 2 deletions tests/test_codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ def _system_timezone():
decimal.Decimal("-1.00000000000000"),
decimal.Decimal("-2.00000000000000"),
decimal.Decimal("1000000000000000.00000000000000"),
decimal.Decimal("-0.00000000000000"),
decimal.Decimal(1234),
decimal.Decimal(-1234),
decimal.Decimal("1234000000.00088883231"),
Expand Down Expand Up @@ -111,7 +110,7 @@ def _system_timezone():
decimal.Decimal("0.0"),
decimal.Decimal("-1.0"),
decimal.Decimal("1.0E-1000"),
decimal.Decimal("1.0E1000"),
decimal.Decimal("1E1000"),
decimal.Decimal("0.000000000000000000000000001"),
decimal.Decimal("0.000000000000010000000000001"),
decimal.Decimal("0.00000000000000000000000001"),
Expand Down Expand Up @@ -141,6 +140,16 @@ def _system_timezone():
decimal.Decimal("0.001"),
decimal.Decimal("0.01"),
decimal.Decimal("0.1"),
decimal.Decimal("0.10"),
decimal.Decimal("0.100"),
decimal.Decimal("0.1000"),
decimal.Decimal("0.10000"),
decimal.Decimal("0.100000"),
decimal.Decimal("0.00001000"),
decimal.Decimal("0.000010000"),
decimal.Decimal("0.0000100000"),
decimal.Decimal("0.00001000000"),
decimal.Decimal("1" + "0" * 117 + "." + "0" * 161)
)),
('bytea', 'bytea', (
bytes(range(256)),
Expand Down Expand Up @@ -502,6 +511,14 @@ async def test_standard_codecs(self):
else:
self.assertEqual(result, outputval, err_msg)

if (typname == 'numeric' and
isinstance(inputval, decimal.Decimal)):
self.assertEqual(
result.as_tuple(),
outputval.as_tuple(),
err_msg,
)

with self.subTest(sample=None, typname=typname):
# Test that None is handled for all types.
rsample = await st.fetchval(None)
Expand Down

0 comments on commit b087511

Please sign in to comment.