jsatt / mock

Automatically exported from code.google.com/p/mock
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Crash on comparing call_args with long strings #232

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

>>> from mock import Mock
>>> m = Mock()
>>> m(1, 2)
<Mock name='mock()' id='139781492681104'>
>>> m.call_args == "foob"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/wilfred/.py_envs/trifle/lib/python2.7/site-packages/mock.py", line 2061, in __eq__
    first, second = other
ValueError: too many values to unpack

What is the expected output? What do you see instead?

Expected False, got an error instead.

What version of the product are you using? On what operating system?

I'm using mock 1.0.1 with Python 2.7.

Original issue reported on code.google.com by yowilf...@gmail.com on 24 May 2014 at 11:24