Skip to content

Commit 3a90fef

Browse files
committed
Fix test_timetz_encoding on Python 3.10
Passing `decimal.Decimal` to `datetime.combine` raises on Python 3.10
1 parent 0a3ae7f commit 3a90fef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/test_codecs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1499,7 +1499,7 @@ async def test_timetz_encoding(self):
14991499
await self.con.execute("SET TIME ZONE 'America/Toronto'")
15001500
# Check decoding:
15011501
row = await self.con.fetchrow(
1502-
'SELECT extract(epoch from now()) AS epoch, '
1502+
'SELECT extract(epoch from now())::float8 AS epoch, '
15031503
'now()::date as date, now()::timetz as time')
15041504
result = datetime.datetime.combine(row['date'], row['time'])
15051505
expected = datetime.datetime.fromtimestamp(row['epoch'],

0 commit comments

Comments
 (0)