diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-10-27 08:20:01 -0400 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-10-27 08:20:01 -0400 |
commit | 78fc70503ee0b91276f4e2f270c8ef16669cca44 (patch) | |
tree | 7094fde3acf1de077b614712d9eb264cda9eb0e9 /Lib/test/test_exceptions.py | |
parent | 6d089df1b80f2f9054db003499a6948a6774b96e (diff) | |
download | cpython-git-78fc70503ee0b91276f4e2f270c8ef16669cca44.tar.gz |
add a test for an assertion with tuple msg
Diffstat (limited to 'Lib/test/test_exceptions.py')
-rw-r--r-- | Lib/test/test_exceptions.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 5526fb77eb..216064161c 100644 --- a/Lib/test/test_exceptions.py +++ b/Lib/test/test_exceptions.py @@ -473,6 +473,12 @@ class ExceptionTests(unittest.TestCase): with self.assertRaises(TypeError): raise MyException + def test_assert_with_tuple_arg(self): + try: + assert False, (3,) + except AssertionError as e: + self.assertEqual(str(e), "(3,)") + # Helper class used by TestSameStrAndUnicodeMsg class ExcWithOverriddenStr(Exception): |