]> granicus.if.org Git - python/commitdiff
add a test for an assertion with tuple msg
authorBenjamin Peterson <benjamin@python.org>
Thu, 27 Oct 2011 12:20:01 +0000 (08:20 -0400)
committerBenjamin Peterson <benjamin@python.org>
Thu, 27 Oct 2011 12:20:01 +0000 (08:20 -0400)
Lib/test/test_exceptions.py

index 5526fb77eb8e68b3fa47d599fae1a92eeb697189..216064161cb3a9bbd869867c65daa2bed2562f58 100644 (file)
@@ -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):