Issue #24857: Comparing call_args to a long sequence now correctly returns a

boolean result instead of raising an exception.

Patch by A Kaptur.
This commit is contained in:
Berker Peksag 2015-09-09 23:39:45 +03:00
commit 29bf4d403d
3 changed files with 9 additions and 2 deletions

View file

@ -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()