DKorytkin / pytest-never-sleep

This plugin helps to avoid adding tests without mock `time.sleep`

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

AttributeError: 'tuple' object has no attribute '__name__'

DKorytkin opened this issue · comments

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "lib/python3.7/site-packages/_pytest/main.py", line 105, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>   File "lib/python3.7/site-packages/pluggy/__init__.py", line 617, in __call__
INTERNALERROR>     return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR>   File "lib/python3.7/site-packages/pluggy/__init__.py", line 222, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "lib/python3.7/site-packages/pluggy/__init__.py", line 216, in <lambda>
INTERNALERROR>     firstresult=hook.spec_opts.get('firstresult'),
INTERNALERROR>   File "lib/python3.7/site-packages/pluggy/callers.py", line 201, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "lib/python3.7/site-packages/pluggy/callers.py", line 76, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "lib/python3.7/site-packages/pluggy/callers.py", line 180, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "pytest-never-sleep/pytest_never_sleep/plugin.py", line 118, in pytest_sessionstart
INTERNALERROR>     _fake_time_sleep.patch_time_sleep()
INTERNALERROR>   File "pytest-never-sleep/pytest_never_sleep/never_sleep.py", line 308, in patch_time_sleep
INTERNALERROR>     if module in self.cache:
INTERNALERROR>   File "pytest-never-sleep/pytest_never_sleep/never_sleep.py", line 149, in __contains__
INTERNALERROR>     return self.get(module)
INTERNALERROR>   File "pytest-never-sleep/pytest_never_sleep/never_sleep.py", line 198, in get
INTERNALERROR>     module_hash, module_attrs = self.data.get(module.__name__) or ("", [])
INTERNALERROR> AttributeError: 'tuple' object has no attribute '__name__'