Skip to content

Crash on comparing call_args with long strings #232

@GoogleCodeExporter

Description

@GoogleCodeExporter
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions