diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/dialect/test_postgresql.py | 2 | ||||
-rw-r--r-- | test/sql/test_types.py | 9 |
2 files changed, 9 insertions, 2 deletions
diff --git a/test/dialect/test_postgresql.py b/test/dialect/test_postgresql.py index bbf476560..1f8a87bc0 100644 --- a/test/dialect/test_postgresql.py +++ b/test/dialect/test_postgresql.py @@ -287,7 +287,7 @@ class FloatCoercionTest(fixtures.TablesTest, AssertsExecutionResults): metadata = self.metadata t1 = Table('t', metadata, Column('x', postgresql.ARRAY(Float)), - Column('y', postgresql.ARRAY(postgresql.REAL)), + Column('y', postgresql.ARRAY(REAL)), Column('z', postgresql.ARRAY(postgresql.DOUBLE_PRECISION)), Column('q', postgresql.ARRAY(Numeric)) ) diff --git a/test/sql/test_types.py b/test/sql/test_types.py index d154aada7..7865a5296 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -55,6 +55,7 @@ class AdaptTest(fixtures.TestBase): for dialect in self._all_dialects(): for type_, expected in ( + (REAL, "REAL"), (FLOAT, "FLOAT"), (NUMERIC, "NUMERIC"), (DECIMAL, "DECIMAL"), @@ -120,7 +121,13 @@ class AdaptTest(fixtures.TestBase): for k in t1.__dict__: if k == 'impl': continue - eq_(getattr(t2, k), t1.__dict__[k]) + # assert each value was copied, or that + # the adapted type has a more specific + # value than the original (i.e. SQL Server + # applies precision=24 for REAL) + assert \ + getattr(t2, k) == t1.__dict__[k] or \ + t1.__dict__[k] is None def test_plain_init_deprecation_warning(self): for typ in (Integer, Date, SmallInteger): |