New issue 47 by openvcd...@gmail.com: StubOutClassWithMocks does not work
with abstract base classes (ABC)
http://code.google.com/p/pymox/issues/detail?id=47
What steps will reproduce the problem?
Create a file foo.py containing the following class definitions:
import abc
class Foo(object):
__metaclass__ = abc.ABCMeta
class Bar(Foo):
pass
Now execute the following:
import foo
import mox
mox.Mox().StubOutClassWithMocks(foo, 'Foo')
What is the expected output?
StubOutClassWithMocks() should not produce any errors.
What do you see instead?
Raises "TypeError: Given attr is not a Class. Use StubOutWithMock."
Reason: type(foo.Foo) is <class 'abc.ABCMeta'>, which doesn't fall into any
of the categories in _USE_MOCK_FACTORY.
--
You received this message because you are subscribed to the Google Groups "mox-discuss" group.
To post to this group, send email to mox-d...@googlegroups.com.
To unsubscribe from this group, send email to mox-discuss+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/mox-discuss?hl=en.