derwiki-adroll / mock

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

mock 0.7.0b3 fails to spec old style classes #56

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
>>> import mock
>>> class Foo:
...      bar = 7
... 
>>> mock.Mock(spec=Foo)
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/zagy/development/eggs/mock-0.7.0b3-py2.7.egg/mock.py", line 253, in __init__
    _spec_class = spec.__class__
AttributeError: class Foo has no attribute '__class__'

Original issue reported on code.google.com by christ...@zagrodnick.de on 12 Nov 2010 at 9:24

GoogleCodeExporter commented 9 years ago
Thanks for reporting this. It is now fixed in the repository.

Original comment by fuzzyman on 12 Nov 2010 at 11:39