Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2f8dfcd

Browse files
committed
add a test for an assertion with tuple msg
1 parent 065836e commit 2f8dfcd

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Lib/test/test_raise.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ def __new__(cls, *args):
130130
with self.assertRaises(TypeError):
131131
raise MyException
132132

133+
def test_assert_with_tuple_arg(self):
134+
try:
135+
assert False, (3,)
136+
except AssertionError as e:
137+
self.assertEqual(str(e), "(3,)")
138+
139+
133140

134141
class TestCause(unittest.TestCase):
135142
def test_invalid_cause(self):

0 commit comments

Comments
 (0)