diff options
author | Benjamin Peterson <benjamin@python.org> | 2011-10-27 12:20:01 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2011-10-27 12:20:01 (GMT) |
commit | 2f8dfcd6f4553d3d0063e32a1a9a3d98f5119dcd (patch) | |
tree | 2692101dc2d19ee1cbde4a03f6aa3f799577f7c4 /Lib/test/test_raise.py | |
parent | 065836ec9c76ed7134562438f5a760a5e20b27e4 (diff) | |
download | cpython-2f8dfcd6f4553d3d0063e32a1a9a3d98f5119dcd.zip cpython-2f8dfcd6f4553d3d0063e32a1a9a3d98f5119dcd.tar.gz cpython-2f8dfcd6f4553d3d0063e32a1a9a3d98f5119dcd.tar.bz2 |
add a test for an assertion with tuple msg
Diffstat (limited to 'Lib/test/test_raise.py')
-rw-r--r-- | Lib/test/test_raise.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Lib/test/test_raise.py b/Lib/test/test_raise.py index e02c1af..92c50c7 100644 --- a/Lib/test/test_raise.py +++ b/Lib/test/test_raise.py @@ -130,6 +130,13 @@ class TestRaise(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,)") + + class TestCause(unittest.TestCase): def test_invalid_cause(self): |