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.0.14~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6c6d9907f29866d3416bfa4d00fe8a63c06508e6;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 24c993396..b0ab6d794 100644 --- a/tests/fix_faker.py +++ b/tests/fix_faker.py @@ -484,10 +484,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