From: Daniele Varrazzo Date: Sat, 14 May 2022 22:24:17 +0000 (+0200) Subject: test: skip testing random multirange arrays with empty last elements X-Git-Tag: 3.1~100 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=67d24bc729e33b7b751d6c9c7c7ba777571ea7c0;p=thirdparty%2Fpsycopg.git test: skip testing random multirange arrays with empty last elements Previously we were skipping the ones with an empty first element, because of a known shortcoming in finding the right OID. Now that we scan the whole array to find all the elements' classes, it's the last entry which might break dumping. --- diff --git a/tests/fix_faker.py b/tests/fix_faker.py index 39031e8b4..86c3c0ee8 100644 --- a/tests/fix_faker.py +++ b/tests/fix_faker.py @@ -491,10 +491,10 @@ class Faker: while 1: rv = [self.make(spec) for i in range(length)] - # TODO multirange lists fail binary dump if the first element is + # TODO multirange lists fail binary dump if the last element is # empty and there is no type annotation. See xfail in # test_multirange::test_dump_builtin_array - if rv and isinstance(rv[0], Multirange) and not rv[0]: + if rv and isinstance(rv[-1], Multirange) and not rv[-1]: continue return rv