From 78fc70503ee0b91276f4e2f270c8ef16669cca44 Mon Sep 17 00:00:00 2001 From: Benjamin Peterson Date: Thu, 27 Oct 2011 08:20:01 -0400 Subject: add a test for an assertion with tuple msg --- Lib/test/test_exceptions.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/test/test_exceptions.py b/Lib/test/test_exceptions.py index 5526fb7..2160641 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): -- cgit v0.12