derwiki-adroll / mock

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

autospec doesn't work correctly with unbound methods #128

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The first parameter is removed from the signature of unbound methods:
{{{
        >>> class Foo(object):
        ...   def foo(self):
        ...     pass
        ...
        >>> Foo.foo(Foo())
        >>> from mock import create_autospec
        >>> MockFoo = create_autospec(Foo)
        >>> MockFoo.foo(MockFoo())
        Traceback (most recent call last):
          ...
        TypeError: <lambda>() takes exactly 1 argument (2 given)
}}}

Original issue reported on code.google.com by fuzzyman on 3 Jan 2012 at 5:03

GoogleCodeExporter commented 9 years ago

Original comment by fuzzyman on 25 Mar 2012 at 3:48

GoogleCodeExporter commented 9 years ago

Original comment by fuzzyman on 28 Mar 2012 at 3:05

GoogleCodeExporter commented 9 years ago

Original comment by fuzzyman on 3 Sep 2012 at 12:34