]> git.ipfire.org Git - thirdparty/psycopg.git/commitdiff
Avoid to create emtpy ranges in tests
authorDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 7 Oct 2021 20:23:36 +0000 (22:23 +0200)
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>
Thu, 7 Oct 2021 20:28:54 +0000 (22:28 +0200)
tests/fix_faker.py

index e6c384c65f0154e80e65bdaca81fe24f82a81b74..75f660854669176bc0326731a1bfef5da5929817 100644 (file)
@@ -646,6 +646,10 @@ class Faker:
                 bounds.append(val)
 
             if bounds[0] is not None and bounds[1] is not None:
+                if bounds[0] == bounds[1]:
+                    # It would come out empty
+                    continue
+
                 if bounds[0] > bounds[1]:
                     bounds.reverse()