]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Add unit test for UUID arrays in PostgreSQL.
authorKevin Deldycke <kevin@deldycke.com>
Thu, 6 Feb 2014 10:44:52 +0000 (11:44 +0100)
committerMike Bayer <mike_mp@zzzcomputing.com>
Mon, 2 Feb 2015 00:03:48 +0000 (19:03 -0500)
(cherry picked from commit cf4e421248e3175b97170d0c6930b360ff326c06)

test/dialect/postgresql/test_types.py

index 4f825c1779b15f2f7af207438ce771d1032696ab..7e432ca2346c7dc21d2a97f3008e3dab18627782 100644 (file)
@@ -1055,6 +1055,19 @@ class UUIDTest(fixtures.TestBase):
             uuid.uuid4()
         )
 
+    @testing.fails_on('postgresql+zxjdbc',
+                      'column "data" is of type uuid[] but expression is of type character varying')
+    @testing.fails_on('postgresql+pg8000', 'No support for UUID type')
+    def test_uuid_array(self):
+        import uuid
+        self._test_round_trip(
+            Table('utable', MetaData(),
+                Column('data', postgresql.ARRAY(postgresql.UUID()))
+            ),
+            [str(uuid.uuid4()), str(uuid.uuid4())],
+            [str(uuid.uuid4()), str(uuid.uuid4())],
+        )
+
     def test_no_uuid_available(self):
         from sqlalchemy.dialects.postgresql import base
         uuid_type = base._python_UUID