summaryrefslogtreecommitdiff
path: root/Lib/unittest/test
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2015-09-09 23:35:25 +0300
committerBerker Peksag <berker.peksag@gmail.com>2015-09-09 23:35:25 +0300
commit3fc536f1c95abdd57bc4172fb8eb96fd86cab4d3 (patch)
treece314beaf09bd4a8891a8d815cb1d022dd289c7a /Lib/unittest/test
parentd1a98587fe3bc60985c6d6c36b8cf52f1f57750b (diff)
downloadcpython-git-3fc536f1c95abdd57bc4172fb8eb96fd86cab4d3.tar.gz
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 976c40fc45..cf1673c6ca 100644
--- a/Lib/unittest/test/testmock/testmock.py
+++ b/Lib/unittest/test/testmock/testmock.py
@@ -291,6 +291,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()