]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Skip testing with lists of floats.
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 28 Jul 2021 13:27:19 +0000 (15:27 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Wed, 28 Jul 2021 13:27:19 +0000 (15:27 +0200)
There might be rounding problems and problems with inf.

tests/fix_faker.py

index 45cccb6aaab4b1b0565d1b192d7ceb8c7f64f00f..d1ad460b59a91cc1025021deaa98397134f3dd0e 100644 (file)
@@ -446,6 +446,11 @@ class Faker:
             scls = choice(self.types)
             if scls is cls:
                 continue
+            if scls is float:
+                # TODO: float lists are currently adapted as decimal.
+                # There may be rounding errors or problems with inf.
+                continue
+
             schema = self.make_schema(scls)
             if schema is not None:
                 break