We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 902b828 commit 4d4a4ecCopy full SHA for 4d4a4ec
1 file changed
apsw/tests/__main__.py
@@ -10647,7 +10647,11 @@ def testExtDataClassRowFactory(self) -> None:
10647
)
10648
self.assertEqual(dcrf.get_type("an integer"), int)
10649
for row in self.db.execute("select * from foo"):
10650
- a = row.__annotations__
+ self.assertTrue(dataclasses.is_dataclass(row))
10651
+ if hasattr(inspect, "get_annotations"):
10652
+ a= inspect.get_annotations(row.__class__)
10653
+ else:
10654
+ a = row.__class__.__annotations__
10655
self.assertEqual(a["one"], typing.Any)
10656
self.assertEqual(a["two"], int)
10657
self.assertEqual(a["three"], str)
0 commit comments