This is relevant when using runpytest in-process. Fixes: E def test_1(testdir): E testdir.runpytest() E > __import__('pdb').set_trace() E E ../../test_trace_after_runpytest.py:3: E …/Vcs/pytest/src/_pytest/debugging.py:81: in set_trace E tw = _pytest.config.create_terminal_writer(cls._config) E E config = None, args = (), kwargs = {}, tw = <py._io.terminalwriter.TerminalWriter object at 0x7f1097088160> E E def create_terminal_writer(config, *args, **kwargs): E """Create a TerminalWriter instance configured according to the options E in the config object. Every code which requires a TerminalWriter object E and has access to a config object should use this function. E """ E tw = py.io.TerminalWriter(*args, **kwargs) E > if config.option.color == "yes": E E AttributeError: 'NoneType' object has no attribute 'option' |
||
---|---|---|
.. | ||
_pytest | ||
pytest.py |