From: Benjamin Peterson Date: Thu, 27 Oct 2011 12:20:01 +0000 (-0400) Subject: add a test for an assertion with tuple msg X-Git-Tag: v2.7.3rc1~372 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=78fc70503ee0b91276f4e2f270c8ef16669cca44;p=python add a test for an assertion with tuple msg --- 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):