diff options
| author | Federico Caselli <cfederico87@gmail.com> | 2021-03-17 00:27:18 +0100 |
|---|---|---|
| committer | Federico Caselli <cfederico87@gmail.com> | 2021-10-27 22:10:52 +0200 |
| commit | 75fb1c7479b9ddeaaed5604c0111382edc69e4ee (patch) | |
| tree | 06d73c000e43301740b2447221b4119ff95f6237 /test/dialect/postgresql | |
| parent | c51ac334df303a55d3bad77f1b9a7ed79b0da92d (diff) | |
| download | sqlalchemy-75fb1c7479b9ddeaaed5604c0111382edc69e4ee.tar.gz | |
Improve array support on pg8000
References: #6023
Change-Id: I0f6cbc34b3c0bfc0b8c86b3ebe4531e23039b6c0
Diffstat (limited to 'test/dialect/postgresql')
| -rw-r--r-- | test/dialect/postgresql/test_types.py | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/test/dialect/postgresql/test_types.py b/test/dialect/postgresql/test_types.py index dd0a1be0f..d1c0361e4 100644 --- a/test/dialect/postgresql/test_types.py +++ b/test/dialect/postgresql/test_types.py @@ -1443,7 +1443,6 @@ class ArrayRoundTripTest(object): __only_on__ = "postgresql" __backend__ = True - __unsupported_on__ = ("postgresql+pg8000",) ARRAY = postgresql.ARRAY @@ -1962,14 +1961,8 @@ class ArrayRoundTripTest(object): (sqltypes.Unicode, unicode_values), (postgresql.JSONB, json_values), (sqltypes.Boolean, lambda x: [False] + [True] * x), - ( - sqltypes.LargeBinary, - binary_values, - ), - ( - postgresql.BYTEA, - binary_values, - ), + (sqltypes.LargeBinary, binary_values), + (postgresql.BYTEA, binary_values), ( postgresql.INET, lambda x: [ @@ -2047,6 +2040,7 @@ class ArrayRoundTripTest(object): (postgresql.ENUM(AnEnum), enum_values), (sqltypes.Enum(AnEnum, native_enum=True), enum_values), (sqltypes.Enum(AnEnum, native_enum=False), enum_values), + (postgresql.ENUM(AnEnum, native_enum=True), enum_values), ] if not exclude_json: @@ -2057,6 +2051,22 @@ class ArrayRoundTripTest(object): ] ) + _pg8000_skip_types = { + postgresql.HSTORE, # return not parsed returned as string + } + for i in range(len(elements)): + elem = elements[i] + if ( + elem[0] in _pg8000_skip_types + or type(elem[0]) in _pg8000_skip_types + ): + elem += ( + testing.skip_if( + "postgresql+pg8000", "type not supported by pg8000" + ), + ) + elements[i] = elem + return testing.combinations_list( elements, argnames="type_,gen", id_="na" ) |
