Traceback (most recent call last):
File "/usr/lib64/python3.5/runpy.py", line 170, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib64/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/usr/lib/python3.5/site-packages/pytest.py", line 17, in <module>
raise SystemExit(pytest.main())
File "/usr/lib/python3.5/site-packages/_pytest/config.py", line 47, in main
config = _prepareconfig(args, plugins)
File "/usr/lib/python3.5/site-packages/_pytest/config.py", line 156, in _prepareconfig
pluginmanager=pluginmanager, args=args)
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
_MultiCall(methods, kwargs, hook.spec_opts).execute()
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
return _wrapped_call(hook_impl.function(*args), self.execute)
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 250, in _wrapped_call
wrap_controller.send(call_outcome)
File "/usr/lib/python3.5/site-packages/_pytest/helpconfig.py", line 32, in pytest_cmdline_parse
config = outcome.get_result()
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 279, in get_result
raise ex[1].with_traceback(ex[2])
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
self.result = func()
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
res = hook_impl.function(*args)
File "/usr/lib/python3.5/site-packages/_pytest/config.py", line 923, in pytest_cmdline_parse
self.parse(args)
File "/usr/lib/python3.5/site-packages/_pytest/config.py", line 1080, in parse
self._preparse(args, addopts=addopts)
File "/usr/lib/python3.5/site-packages/_pytest/config.py", line 1051, in _preparse
args=args, parser=self._parser)
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
_MultiCall(methods, kwargs, hook.spec_opts).execute()
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
return _wrapped_call(hook_impl.function(*args), self.execute)
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 254, in _wrapped_call
return call_outcome.get_result()
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 279, in get_result
raise ex[1].with_traceback(ex[2])
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
self.result = func()
File "/usr/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
res = hook_impl.function(*args)
File "/usr/lib/python3.5/site-packages/pytest_cov/plugin.py", line 95, in pytest_load_initial_conftests
plugin = CovPlugin(ns, early_config.pluginmanager)
File "/usr/lib/python3.5/site-packages/pytest_cov/plugin.py", line 150, in __init__
self.start(engine.Central)
File "/usr/lib/python3.5/site-packages/pytest_cov/plugin.py", line 171, in start
self.cov_controller.start()
File "/usr/lib/python3.5/site-packages/pytest_cov/engine.py", line 141, in start
self.cov.erase()
File "/usr/lib/python3.5/site-packages/coverage/control.py", line 727, in erase
self._init()
File "/usr/lib/python3.5/site-packages/coverage/control.py", line 246, in _init
self.source.append(files.canonical_filename(src))
File "/usr/lib/python3.5/site-packages/coverage/files.py", line 61, in canonical_filename
if not os.path.isabs(filename):
File "/usr/lib64/python3.5/posixpath.py", line 64, in isabs
return s.startswith(sep)
AttributeError: 'bool' object has no attribute 'startswith'
[tool:pytest]
addopts = --cov
If
--covis enabled twice, without specifying paths each time, the following backtrace occurs.I encountered this after adding the following to setup.cfg, which also using
--covon the command line.The problem is the rather simple handling of multiple
--covat https://github.com/pytest-dev/pytest-cov/blob/master/src/pytest_cov/plugin.py#L87