Skip to content

Instantly share code, notes, and snippets.

Created July 8, 2016 12:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/1d46599367831e2408eb244661d56653 to your computer and use it in GitHub Desktop.
Save anonymous/1d46599367831e2408eb244661d56653 to your computer and use it in GitHub Desktop.
pytest + pep8 error
py.test --pep8
================================================= test session starts =================================================
platform linux -- Python 3.4.3, pytest-2.9.0, py-1.4.31, pluggy-0.3.1
rootdir: /home/jtanay/dev/botbot/plugins/err-jenkins, inifile:
plugins: flaky-3.1.0, cov-2.2.1, xdist-1.14, pep8-1.0.6
collected 12 items
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/main.py", line 94, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/main.py", line 125, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 724, in __call__
INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 338, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 333, in <lambda>
INTERNALERROR> _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 596, in execute
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/main.py", line 150, in pytest_runtestloop
INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 724, in __call__
INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 338, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 333, in <lambda>
INTERNALERROR> _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 595, in execute
INTERNALERROR> return _wrapped_call(hook_impl.function(*args), self.execute)
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 253, in _wrapped_call
INTERNALERROR> return call_outcome.get_result()
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 278, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 264, in __init__
INTERNALERROR> self.result = func()
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 596, in execute
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/flaky/flaky_pytest_plugin.py", line 68, in pytest_runtest_protocol
INTERNALERROR> self._copy_flaky_attributes(item, test_instance)
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/flaky/_flaky_plugin.py", line 404, in _copy_flaky_attributes
INTERNALERROR> _, test_callable, _ = cls._get_test_declaration_callable_and_name(test)
INTERNALERROR> File "/home/jtanay/.virtualenvs/botbot/lib/python3.4/site-packages/flaky/flaky_pytest_plugin.py", line 359, in _get_test_declaration_callable_and_name
INTERNALERROR> elif hasattr(test.module, callable_name):
INTERNALERROR> AttributeError: 'Pep8Item' object has no attribute 'module'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment