mirror of https://github.com/python/cpython
add a test for an assertion with tuple msg
This commit is contained in:
parent
6d089df1b8
commit
78fc70503e
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue