You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a problem for me because in python 3.8, creating a Mock of an object that has events runs into this issue. Here's the corresponding test case for python 3.8:
classTestMocking(TestBase):
deftest_mock(self):
classMyEvents(Events):
__events__= ('on_eventOne', )
_instance=NoneMyEvents._instance=MyEvents()
# In python 3.8, this results in "EventsException: Event '_is_coroutine' is not declared"unittest.mock.Mock(MyEvents)
The text was updated successfully, but these errors were encountered:
When
__getattr__
raises an EventsException for a missing attribute, it breaksgetattr(obj, name, default)
.Simple test that reproduces it:
This is a problem for me because in python 3.8, creating a Mock of an object that has events runs into this issue. Here's the corresponding test case for python 3.8:
The text was updated successfully, but these errors were encountered: