mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
add a test for an assertion with tuple msg
This commit is contained in:
parent
065836ec9c
commit
2f8dfcd6f4
1 changed files with 7 additions and 0 deletions
|
@ -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):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue