From: Daniele Varrazzo Date: Thu, 28 Oct 2021 23:36:03 +0000 (+0200) Subject: Fix test range comparison with empty ranges X-Git-Tag: 3.0.2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdd6b12132fc8161d0f0259647ec1608d09ee0fe;p=thirdparty%2Fpsycopg.git Fix test range comparison with empty ranges --- diff --git a/tests/fix_faker.py b/tests/fix_faker.py index 36ced9f5e..8a9a3529d 100644 --- a/tests/fix_faker.py +++ b/tests/fix_faker.py @@ -719,7 +719,7 @@ class Faker: want.lower, want.upper + unit, want.bounds[0] + ")" ) - if spec[1] == (dt.datetime, True): + if spec[1] == (dt.datetime, True) and not want.isempty: # work around https://bugs.python.org/issue45347 def fix_dt(x): return x.astimezone(dt.timezone.utc) if x is not None else None