Skip to content

'NoneType' object has no attribute 'configure_node' raised when run with --no-cov #411

@ghost

Description

Description:
When running pytest:
pytest --cov=some/path --no-cov -n auto
I get the following traceback:

INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\_pytest\main.py", line 201, in wrap_session
INTERNALERROR>     config.hook.pytest_sessionstart(session=session)
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\pluggy\hooks.py", line 284, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\pluggy\manager.py", line 68, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\pluggy\manager.py", line 62, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\pluggy\callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\pluggy\callers.py", line 81, in get_result
INTERNALERROR>     _reraise(*ex)  # noqa
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\pluggy\callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\xdist\dsession.py", line 81, in pytest_sessionstart
INTERNALERROR>     nodes = self.nodemanager.setup_nodes(putevent=self.queue.put)
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\xdist\workermanage.py", line 68, in setup_nodes
INTERNALERROR>     nodes.append(self.setup_node(spec, putevent))
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\xdist\workermanage.py", line 77, in setup_node
INTERNALERROR>     node.setup()
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\xdist\workermanage.py", line 246, in setup
INTERNALERROR>     self.config.hook.pytest_configure_node(node=self)
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\pluggy\hooks.py", line 284, in __call__
INTERNALERROR>     return self._hookexec(self, self.get_hookimpls(), kwargs)
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\pluggy\manager.py", line 68, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\pluggy\manager.py", line 62, in <lambda>
INTERNALERROR>     firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\pluggy\callers.py", line 208, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\pluggy\callers.py", line 81, in get_result
INTERNALERROR>     _reraise(*ex)  # noqa
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\pluggy\callers.py", line 187, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "c:\localdata\workspaces\.tox\py27-pylint\lib\site-packages\pytest_cov\plugin.py", line 198, in pytest_configure_node
INTERNALERROR>     self.cov_controller.configure_node(node)
INTERNALERROR> AttributeError: 'NoneType' object has no attribute 'configure_node'

Removing the --no-cov solves the issue.

The --cov is added by my addopts from tox.ini, the --no-cov is added directly to the pytest command

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions