From 4912be0e7f527e2a025067e16bd2390b09f71d9c Mon Sep 17 00:00:00 2001 From: Ion Alberdi Date: Mon, 10 Oct 2022 21:10:45 +0200 Subject: [PATCH] [test_basic_types] Add test for array[%s] on NULL arrays Add test to verifity the fix for #1507. --- tests/test_types_basic.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_types_basic.py b/tests/test_types_basic.py index d21309ef..31f0310d 100755 --- a/tests/test_types_basic.py +++ b/tests/test_types_basic.py @@ -272,6 +272,8 @@ class TypesBasicTests(ConnectingTestCase): ]: curs.execute("select %s::int[]", (a,)) self.assertEqual(curs.fetchone()[0], a) + curs.execute("select array[%s::int[]]", (a,)) + self.assertEqual(curs.fetchone()[0], [a]) def testTypeRoundtripBytes(self): o1 = bytes(range(256))