Skip to content

Commit

Permalink
Fix test_timetz_encoding on Python 3.10
Browse files Browse the repository at this point in the history
Passing `decimal.Decimal` to `datetime.combine` raises on Python 3.10
  • Loading branch information
elprans committed Nov 7, 2021
1 parent 0a3ae7f commit 3a90fef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_codecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ async def test_timetz_encoding(self):
await self.con.execute("SET TIME ZONE 'America/Toronto'")
# Check decoding:
row = await self.con.fetchrow(
'SELECT extract(epoch from now()) AS epoch, '
'SELECT extract(epoch from now())::float8 AS epoch, '
'now()::date as date, now()::timetz as time')
result = datetime.datetime.combine(row['date'], row['time'])
expected = datetime.datetime.fromtimestamp(row['epoch'],
Expand Down

0 comments on commit 3a90fef

Please sign in to comment.