diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-04-05 12:40:55 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-04-05 12:40:55 -0400 |
| commit | b462373b461f652ab20085a612ebd777836ac4da (patch) | |
| tree | 23e6a5b67e04549a1e02c5e153217ff39f500f60 /test/sql | |
| parent | d34bc7da318978f6d0235e5747e94160959eb276 (diff) | |
| download | sqlalchemy-b462373b461f652ab20085a612ebd777836ac4da.tar.gz | |
- 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]
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_types.py | 9 |
1 files changed, 8 insertions, 1 deletions
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): |
