summaryrefslogtreecommitdiffstats
path: root/Lib/unittest/test
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2015-09-09 20:39:45 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2015-09-09 20:39:45 (GMT)
commit29bf4d403dd2cb8875e224f50a4cfeea177d33ae (patch)
tree95bdb0fd4985c21e8c972eb199d1c90b9c38b407 /Lib/unittest/test
parentef05af594126a4c4963f92e7f232a40595c8e308 (diff)
parent3fc536f1c95abdd57bc4172fb8eb96fd86cab4d3 (diff)
downloadcpython-29bf4d403dd2cb8875e224f50a4cfeea177d33ae.zip
cpython-29bf4d403dd2cb8875e224f50a4cfeea177d33ae.tar.gz
cpython-29bf4d403dd2cb8875e224f50a4cfeea177d33ae.tar.bz2
Issue #24857: Comparing call_args to a long sequence now correctly returns a
boolean result instead of raising an exception. Patch by A Kaptur.
Diffstat (limited to 'Lib/unittest/test')
-rw-r--r--Lib/unittest/test/testmock/testmock.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/unittest/test/testmock/testmock.py b/Lib/unittest/test/testmock/testmock.py
index 97d844f..2a6069f 100644
--- a/Lib/unittest/test/testmock/testmock.py
+++ b/Lib/unittest/test/testmock/testmock.py
@@ -300,6 +300,9 @@ class MockTest(unittest.TestCase):
self.assertEqual(mock.call_args,
((sentinel.Arg,), {"kw": sentinel.Kwarg}))
+ # Comparing call_args to a long sequence should not raise
+ # an exception. See issue 24857.
+ self.assertFalse(mock.call_args == "a long sequence")
def test_assert_called_with(self):
mock = Mock()