-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Something is going wrong with the state management.
When we run tests all together, several tests fail with errors such as:
self = <unittest.mock._patch object at 0x119b38650>
def get_original(self):
target = self.getter()
name = self.attribute
original = DEFAULT
local = False
try:
original = target.__dict__[name]
except (AttributeError, KeyError):
original = getattr(target, name, DEFAULT)
else:
local = True
if name in _builtins and isinstance(target, ModuleType):
self.create = True
if not self.create and original is DEFAULT:
> raise AttributeError(
"%s does not have the attribute %r" % (target, name)
)
E AttributeError: <module 'test_finance' from '/Users/.../PycharmProjects/monkeyFunctions/tests/test_patch/test_finance.py'> does not have the attribute 'classify_sentiment_2'
This is likely due to how mocked functions are scoped.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working