To reproduce, simply install pytest-azurepipelines and pytest-flake8 in the same virtualenv, create a blank .py file, and run pytest --flake8. The following error occurs:
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/_pytest/main.py", line 206, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/_pytest/main.py", line 249, in _main
INTERNALERROR> config.hook.pytest_collection(session=session)
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 289, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 87, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 81, in <lambda>
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/_pytest/main.py", line 259, in pytest_collection
INTERNALERROR> return session.perform_collect()
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/_pytest/main.py", line 498, in perform_collect
INTERNALERROR> session=self, config=self.config, items=items
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/pluggy/hooks.py", line 289, in __call__
INTERNALERROR> return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 87, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/pluggy/manager.py", line 81, in <lambda>
INTERNALERROR> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/pluggy/callers.py", line 208, in _multicall
INTERNALERROR> return outcome.get_result()
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/pluggy/callers.py", line 80, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/pluggy/callers.py", line 187, in _multicall
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/tmp/venv/lib/python3.6/site-packages/pytest_azurepipelines.py", line 28, in pytest_collection_modifyitems
INTERNALERROR> parent = item.parent.obj # Test class/module
INTERNALERROR> AttributeError: 'Session' object has no attribute 'obj'
To reproduce, simply install
pytest-azurepipelines
andpytest-flake8
in the same virtualenv, create a blank.py
file, and runpytest --flake8
. The following error occurs: