[test_basic_types] Add test for array[%s] on NULL arrays

Add test to verifity the fix for #1507.
This commit is contained in:
Ion Alberdi 2022-10-10 21:10:45 +02:00 committed by Daniele Varrazzo
parent a12dbc4357
commit 4912be0e7f

View File

@ -272,6 +272,8 @@ class TypesBasicTests(ConnectingTestCase):
]: ]:
curs.execute("select %s::int[]", (a,)) curs.execute("select %s::int[]", (a,))
self.assertEqual(curs.fetchone()[0], a) self.assertEqual(curs.fetchone()[0], a)
curs.execute("select array[%s::int[]]", (a,))
self.assertEqual(curs.fetchone()[0], [a])
def testTypeRoundtripBytes(self): def testTypeRoundtripBytes(self):
o1 = bytes(range(256)) o1 = bytes(range(256))