[Python-checkins] cpython: add a test for an assertion with tuple msg
benjamin.peterson
python-checkins at python.org
Thu Oct 27 14:24:55 CEST 2011
http://hg.python.org/cpython/rev/d264804aa3f6
changeset: 73145:d264804aa3f6
parent: 73140:e7340f2a42eb
user: Benjamin Peterson <benjamin at python.org>
date: Thu Oct 27 08:20:01 2011 -0400
summary:
add a test for an assertion with tuple msg
files:
Lib/test/test_raise.py | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_raise.py b/Lib/test/test_raise.py
--- a/Lib/test/test_raise.py
+++ b/Lib/test/test_raise.py
@@ -130,6 +130,13 @@
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):
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list