From b462373b461f652ab20085a612ebd777836ac4da Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Tue, 5 Apr 2011 12:40:55 -0400 Subject: - REAL has been added to the core types. Supported by Postgresql, SQL Server, MySQL, SQLite. Note that the SQL Server and MySQL versions, which add extra arguments, are also still available from those dialects. [ticket:2081] --- test/sql/test_types.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'test/sql') 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): -- cgit v1.2.1