diff options
| author | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-07-04 13:56:17 -0400 |
|---|---|---|
| committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2011-07-04 13:56:17 -0400 |
| commit | 3daae3e5b6e54163452ed2aca15b300544daf455 (patch) | |
| tree | 4fb760e4bb01c3b263cf3e3baf91667ee9d6e5a0 /test/sql | |
| parent | c0ffa33b2fc676734004895eefe6bc058f105fd6 (diff) | |
| download | sqlalchemy-3daae3e5b6e54163452ed2aca15b300544daf455.tar.gz | |
- Added an improved repr() to TypeEngine objects
that will only display constructor args which
are positional or kwargs that deviate
from the default. [ticket:2209]
Diffstat (limited to 'test/sql')
| -rw-r--r-- | test/sql/test_types.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/sql/test_types.py b/test/sql/test_types.py index 4fbafe684..106818b8d 100644 --- a/test/sql/test_types.py +++ b/test/sql/test_types.py @@ -129,6 +129,17 @@ class AdaptTest(fixtures.TestBase): getattr(t2, k) == t1.__dict__[k] or \ t1.__dict__[k] is None + @testing.uses_deprecated() + def test_repr(self): + for typ in self._all_types(): + if typ in (types.TypeDecorator, types.TypeEngine): + continue + elif typ is dialects.postgresql.ARRAY: + t1 = typ(String) + else: + t1 = typ() + repr(t1) + def test_plain_init_deprecation_warning(self): for typ in (Integer, Date, SmallInteger): assert_raises_message( |
