From 3daae3e5b6e54163452ed2aca15b300544daf455 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Mon, 4 Jul 2011 13:56:17 -0400 Subject: - 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] --- test/sql/test_types.py | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test/sql') 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( -- cgit v1.2.1