diff options
Diffstat (limited to 'test/base/except.py')
-rw-r--r-- | test/base/except.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/base/except.py b/test/base/except.py index 457137c4c..c2b60f32a 100644 --- a/test/base/except.py +++ b/test/base/except.py @@ -25,7 +25,14 @@ class WrapTest(unittest.TestCase): '', [], OperationalError()) except sa_exceptions.DBAPIError: self.assert_(True) - + + def test_tostring(self): + try: + raise sa_exceptions.DBAPIError.instance( + 'this is a message', None, OperationalError()) + except sa_exceptions.DBAPIError, exc: + assert str(exc) == "(OperationalError) 'this is a message' None" + def test_db_error_busted_dbapi(self): try: raise sa_exceptions.DBAPIError.instance( |