diff options
| author | Jason Kirtland <jek@discorporate.us> | 2008-01-12 04:52:05 +0000 |
|---|---|---|
| committer | Jason Kirtland <jek@discorporate.us> | 2008-01-12 04:52:05 +0000 |
| commit | c194962019d1bc7322e20b82c33aa1bab3bc2a28 (patch) | |
| tree | e1e3b8b1119990de7fb3b30f7e3ab6dfa40ca838 /test/engine/reflection.py | |
| parent | 05a693fcb7a57f0362e06da1517cb35279bfaad1 (diff) | |
| download | sqlalchemy-c194962019d1bc7322e20b82c33aa1bab3bc2a28.tar.gz | |
- Undeclared SAWarnings are now fatal to tests as well.
- Fixed typo that was killing runs of individual named tests.
Diffstat (limited to 'test/engine/reflection.py')
| -rw-r--r-- | test/engine/reflection.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/test/engine/reflection.py b/test/engine/reflection.py index ea56e315b..c123b930a 100644 --- a/test/engine/reflection.py +++ b/test/engine/reflection.py @@ -1,6 +1,5 @@ import testbase -import pickle, StringIO, unicodedata, warnings - +import pickle, StringIO, unicodedata from sqlalchemy import * from sqlalchemy import exceptions from sqlalchemy import types as sqltypes @@ -206,21 +205,20 @@ class ReflectionTest(PersistTest): dialect_module.ischema_names = {} try: try: - warnings.filterwarnings('error', 'Did not recognize type') m2 = MetaData(testbase.db) t2 = Table("test", m2, autoload=True) assert False - except RuntimeWarning: + except exceptions.SAWarning: assert True - warnings.filterwarnings('ignore', 'Did not recognize type') - m3 = MetaData(testbase.db) - t3 = Table("test", m3, autoload=True) - assert t3.c.foo.type.__class__ == sqltypes.NullType + @testing.emits_warning('Did not recognize type') + def warns(): + m3 = MetaData(testbase.db) + t3 = Table("test", m3, autoload=True) + assert t3.c.foo.type.__class__ == sqltypes.NullType finally: dialect_module.ischema_names = ischema_names - warnings.filterwarnings('always', 'Did not recognize type') t.drop() def test_override_fkandpkcol(self): |
