Open FRidh opened 5 years ago
Is there any other output?
No, sorry. Maybe if I would attempt to run the test-suite outside a nix-build
.
Please try, as far as I know there is no leak in a traditional environment,
BTW what are the environmental limit imposed in the build env, it's possible the issue exists but is not fatal in a classical sloppy build
I did a nix-shell -A python3.pkgs.pytest_xdist
, moved into a temporary directory, executed genericBuild
so it would go through all the phases, and finally executed the following. I cancelled because I saw my memory use increase quite a bit again.
$ pytest testing -vv
=============================================================================================================== test session starts ===============================================================================================================
platform linux -- Python 3.7.4, pytest-5.1.0, py-1.8.0, pluggy-0.12.0 -- /nix/store/ivah02nhph9ldv18pndg8wrg0h0g98z6-python3-3.7.4/bin/python3.7
cachedir: .pytest_cache
rootdir: /tmp/build/pytest-xdist-1.28.0, inifile: tox.ini, testpaths: testing
plugins: xdist-1.28.0, forked-1.0.2
collected 148 items
testing/acceptance_test.py::TestDistribution::test_n1_pass PASSED [ 0%]
testing/acceptance_test.py::TestDistribution::test_n1_fail PASSED [ 1%]
testing/acceptance_test.py::TestDistribution::test_n1_import_error ^C^C^C
=============================================================================================================== 2 passed in 11.52s ================================================================================================================
Traceback (most recent call last):
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/main.py", line 191, in wrap_session
session.exitstatus = doit(config, session) or 0
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/main.py", line 235, in _main
config.hook.pytest_runtestloop(session=session)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/hooks.py", line 289, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 87, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/_tracing.py", line 80, in __call__
return outcome.get_result()
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 52, in from_call
result = func()
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/_tracing.py", line 78, in <lambda>
outcome = _Result.from_call(lambda: self.oldcall(hook, hook_impls, kwargs))
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 81, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/nix/store/hx57kqi0nkfxm12cykgfjq23hivp9q03-python3.7-pytest-xdist-1.28.0/lib/python3.7/site-packages/xdist/dsession.py", line 115, in pytest_runtestloop
self.loop_once()
File "/nix/store/hx57kqi0nkfxm12cykgfjq23hivp9q03-python3.7-pytest-xdist-1.28.0/lib/python3.7/site-packages/xdist/dsession.py", line 129, in loop_once
eventcall = self.queue.get(timeout=2.0)
File "/nix/store/ivah02nhph9ldv18pndg8wrg0h0g98z6-python3-3.7.4/lib/python3.7/queue.py", line 179, in get
self.not_empty.wait(remaining)
File "/nix/store/ivah02nhph9ldv18pndg8wrg0h0g98z6-python3-3.7.4/lib/python3.7/threading.py", line 300, in wait
gotit = waiter.acquire(True, timeout)
KeyboardInterrupt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/main.py", line 191, in wrap_session
session.exitstatus = doit(config, session) or 0
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/main.py", line 235, in _main
config.hook.pytest_runtestloop(session=session)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/hooks.py", line 289, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 87, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 81, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/main.py", line 256, in pytest_runtestloop
item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/hooks.py", line 289, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 87, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 81, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py", line 72, in pytest_runtest_protocol
runtestprotocol(item, nextitem=nextitem)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py", line 87, in runtestprotocol
reports.append(call_and_report(item, "call", log))
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py", line 167, in call_and_report
call = call_runtest_hook(item, when, **kwds)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py", line 192, in call_runtest_hook
lambda: ihook(item=item, **kwds), when=when, reraise=reraise
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py", line 220, in from_call
result = func()
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py", line 192, in <lambda>
lambda: ihook(item=item, **kwds), when=when, reraise=reraise
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/hooks.py", line 289, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 87, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 81, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py", line 117, in pytest_runtest_call
item.runtest()
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/python.py", line 1423, in runtest
self.ihook.pytest_pyfunc_call(pyfuncitem=self)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/hooks.py", line 289, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 87, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 81, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/python.py", line 170, in pytest_pyfunc_call
result = testfunction(**testargs)
File "/tmp/build/pytest-xdist-1.28.0/testing/acceptance_test.py", line 41, in test_n1_import_error
result = testdir.runpytest(p1, "-n1")
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/pytester.py", line 892, in runpytest
return self._runpytest_method(*args, **kwargs)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/pytester.py", line 864, in runpytest_inprocess
reprec = self.inline_run(*args, **kwargs)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/pytester.py", line 830, in inline_run
ret = pytest.main(list(args), plugins=plugins)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/config/__init__.py", line 77, in main
return config.hook.pytest_cmdline_main(config=config)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/hooks.py", line 289, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 87, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 81, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/main.py", line 228, in pytest_cmdline_main
return wrap_session(config, _main)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/main.py", line 207, in wrap_session
config.hook.pytest_keyboard_interrupt(excinfo=excinfo)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/hooks.py", line 289, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 87, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/_tracing.py", line 80, in __call__
return outcome.get_result()
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 52, in from_call
result = func()
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/_tracing.py", line 78, in <lambda>
outcome = _Result.from_call(lambda: self.oldcall(hook, hook_impls, kwargs))
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 81, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/terminal.py", line 680, in pytest_keyboard_interrupt
self._keyboardinterrupt_memo = excinfo.getrepr(funcargs=True)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/code.py", line 592, in getrepr
return fmt.repr_excinfo(self)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/code.py", line 822, in repr_excinfo
reprtraceback = self.repr_traceback(excinfo)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/code.py", line 772, in repr_traceback
reprentry = self.repr_traceback_entry(entry, einfo)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/code.py", line 718, in repr_traceback_entry
source = self._getentrysource(entry)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/code.py", line 643, in _getentrysource
source = source.deindent()
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/source.py", line 114, in deindent
newsource.lines[:] = deindent(self.lines)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/source.py", line 258, in deindent
return textwrap.dedent("\n".join(lines)).splitlines()
File "/nix/store/ivah02nhph9ldv18pndg8wrg0h0g98z6-python3-3.7.4/lib/python3.7/textwrap.py", line 461, in dedent
text = re.sub(r'(?m)^' + margin, '', text)
File "/nix/store/ivah02nhph9ldv18pndg8wrg0h0g98z6-python3-3.7.4/lib/python3.7/re.py", line 192, in sub
return _compile(pattern, flags).sub(repl, string, count)
File "/nix/store/ivah02nhph9ldv18pndg8wrg0h0g98z6-python3-3.7.4/lib/python3.7/re.py", line 286, in _compile
p = sre_compile.compile(pattern, flags)
File "/nix/store/ivah02nhph9ldv18pndg8wrg0h0g98z6-python3-3.7.4/lib/python3.7/sre_compile.py", line 764, in compile
p = sre_parse.parse(p, flags)
File "/nix/store/ivah02nhph9ldv18pndg8wrg0h0g98z6-python3-3.7.4/lib/python3.7/sre_parse.py", line 940, in parse
p.pattern.flags = fix_flags(str, p.pattern.flags)
File "/nix/store/ivah02nhph9ldv18pndg8wrg0h0g98z6-python3-3.7.4/lib/python3.7/sre_parse.py", line 908, in fix_flags
if not flags & SRE_FLAG_ASCII:
KeyboardInterrupt
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/bin/.pytest-wrapped", line 11, in <module>
sys.exit(main())
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/config/__init__.py", line 77, in main
return config.hook.pytest_cmdline_main(config=config)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/hooks.py", line 289, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 87, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 81, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/main.py", line 228, in pytest_cmdline_main
return wrap_session(config, _main)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/main.py", line 207, in wrap_session
config.hook.pytest_keyboard_interrupt(excinfo=excinfo)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/hooks.py", line 289, in __call__
return self._hookexec(self, self.get_hookimpls(), kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 87, in _hookexec
return self._inner_hookexec(hook, methods, kwargs)
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py", line 81, in <lambda>
firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
return outcome.get_result()
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
raise ex[1].with_traceback(ex[2])
File "/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
res = hook_impl.function(*args)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/terminal.py", line 680, in pytest_keyboard_interrupt
self._keyboardinterrupt_memo = excinfo.getrepr(funcargs=True)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/code.py", line 592, in getrepr
return fmt.repr_excinfo(self)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/code.py", line 822, in repr_excinfo
reprtraceback = self.repr_traceback(excinfo)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/code.py", line 772, in repr_traceback
reprentry = self.repr_traceback_entry(entry, einfo)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/code.py", line 718, in repr_traceback_entry
source = self._getentrysource(entry)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/code.py", line 641, in _getentrysource
source = entry.getsource(self.astcache)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/code.py", line 227, in getsource
self.lineno, source, astnode=astnode
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/source.py", line 294, in getstatementrange_ast
start, end = get_statement_startend2(lineno, astnode)
File "/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/_code/source.py", line 267, in get_statement_startend2
for x in ast.walk(node):
File "/nix/store/ivah02nhph9ldv18pndg8wrg0h0g98z6-python3-3.7.4/lib/python3.7/ast.py", line 234, in walk
todo.extend(iter_child_nodes(node))
File "/nix/store/ivah02nhph9ldv18pndg8wrg0h0g98z6-python3-3.7.4/lib/python3.7/ast.py", line 189, in iter_child_nodes
for name, field in iter_fields(node):
File "/nix/store/ivah02nhph9ldv18pndg8wrg0h0g98z6-python3-3.7.4/lib/python3.7/ast.py", line 178, in iter_fields
try:
KeyboardInterrupt
Better output:
$ pytest testing -vvvv --full-trace
=============================================================================================================== test session starts ===============================================================================================================
platform linux -- Python 3.7.4, pytest-5.1.0, py-1.8.0, pluggy-0.12.0 -- /nix/store/ivah02nhph9ldv18pndg8wrg0h0g98z6-python3-3.7.4/bin/python3.7
cachedir: .pytest_cache
rootdir: /tmp/build/pytest-xdist-1.28.0, inifile: tox.ini, testpaths: testing
plugins: xdist-1.28.0, forked-1.0.2
collected 148 items
testing/acceptance_test.py::TestDistribution::test_n1_pass PASSED [ 0%]
testing/acceptance_test.py::TestDistribution::test_n1_fail PASSED [ 1%]
testing/acceptance_test.py::TestDistribution::test_n1_import_error ^C
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! KeyboardInterrupt !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
config = <_pytest.config.Config object at 0x7fc644758c10>, doit = <function _main at 0x7fc644829ef0>
def wrap_session(config, doit):
"""Skeleton command line program"""
session = Session(config)
session.exitstatus = ExitCode.OK
initstate = 0
try:
try:
config._do_configure()
initstate = 1
config.hook.pytest_sessionstart(session=session)
initstate = 2
> session.exitstatus = doit(config, session) or 0
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/main.py:191:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
config = <_pytest.config.Config object at 0x7fc644758c10>, session = <Session pytest-xdist-1.28.0 exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=148>
def _main(config, session):
""" default command line protocol for initialization, session,
running tests and reporting. """
config.hook.pytest_collection(session=session)
> config.hook.pytest_runtestloop(session=session)
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/main.py:235:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtestloop'>, args = (), kwargs = {'session': <Session pytest-xdist-1.28.0 exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=148>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/hooks.py:289:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7fc6453195d0>, hook = <_HookCaller 'pytest_runtestloop'>
methods = [<HookImpl plugin_name='main', plugin=<module '_pytest.main' from '/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3...t/main.py'>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7fc6445c0950>>]
kwargs = {'session': <Session pytest-xdist-1.28.0 exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=148>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtestloop'>
methods = [<HookImpl plugin_name='main', plugin=<module '_pytest.main' from '/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3...t/main.py'>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7fc6445c0950>>]
kwargs = {'session': <Session pytest-xdist-1.28.0 exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=148>}
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
session = <Session pytest-xdist-1.28.0 exitstatus=<ExitCode.OK: 0> testsfailed=0 testscollected=148>
def pytest_runtestloop(session):
if session.testsfailed and not session.config.option.continue_on_collection_errors:
raise session.Interrupted("%d errors during collection" % session.testsfailed)
if session.config.option.collectonly:
return True
for i, item in enumerate(session.items):
nextitem = session.items[i + 1] if i + 1 < len(session.items) else None
> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/main.py:256:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_protocol'>, args = (), kwargs = {'item': <Function test_n1_import_error>, 'nextitem': <Function test_n2_import_error>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/hooks.py:289:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7fc6453195d0>, hook = <_HookCaller 'pytest_runtest_protocol'>
methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-pyt...'/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/warnings.py'>>]
kwargs = {'item': <Function test_n1_import_error>, 'nextitem': <Function test_n2_import_error>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_protocol'>
methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-pyt...'/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/warnings.py'>>]
kwargs = {'item': <Function test_n1_import_error>, 'nextitem': <Function test_n2_import_error>}
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <Function test_n1_import_error>, nextitem = <Function test_n2_import_error>
def pytest_runtest_protocol(item, nextitem):
item.ihook.pytest_runtest_logstart(nodeid=item.nodeid, location=item.location)
> runtestprotocol(item, nextitem=nextitem)
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py:72:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <Function test_n1_import_error>, log = True, nextitem = <Function test_n2_import_error>
def runtestprotocol(item, log=True, nextitem=None):
hasrequest = hasattr(item, "_request")
if hasrequest and not item._request:
item._initrequest()
rep = call_and_report(item, "setup", log)
reports = [rep]
if rep.passed:
if item.config.getoption("setupshow", False):
show_test_item(item)
if not item.config.getoption("setuponly", False):
> reports.append(call_and_report(item, "call", log))
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <Function test_n1_import_error>, when = 'call', log = True, kwds = {}
def call_and_report(item, when, log=True, **kwds):
> call = call_runtest_hook(item, when, **kwds)
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py:167:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <Function test_n1_import_error>, when = 'call', kwds = {}, hookname = 'pytest_runtest_call', reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
def call_runtest_hook(item, when, **kwds):
hookname = "pytest_runtest_" + when
ihook = getattr(item.ihook, hookname)
reraise = (Exit,)
if not item.config.getoption("usepdb", False):
reraise += (KeyboardInterrupt,)
return CallInfo.from_call(
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py:192:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
cls = <class '_pytest.runner.CallInfo'>, func = <function call_runtest_hook.<locals>.<lambda> at 0x7fc6444974d0>, when = 'call', reraise = (<class '_pytest.outcomes.Exit'>, <class 'KeyboardInterrupt'>)
@classmethod
def from_call(cls, func, when, reraise=None):
#: context of invocation: one of "setup", "call",
#: "teardown", "memocollect"
start = time()
excinfo = None
try:
> result = func()
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py:220:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> lambda: ihook(item=item, **kwds), when=when, reraise=reraise
)
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py:192:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_runtest_call'>, args = (), kwargs = {'item': <Function test_n1_import_error>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/hooks.py:289:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7fc6453195d0>, hook = <_HookCaller 'pytest_runtest_call'>
methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-pyt..._item=None>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7fc6445c0950>>]
kwargs = {'item': <Function test_n1_import_error>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_runtest_call'>
methods = [<HookImpl plugin_name='runner', plugin=<module '_pytest.runner' from '/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-pyt..._item=None>>, <HookImpl plugin_name='logging-plugin', plugin=<_pytest.logging.LoggingPlugin object at 0x7fc6445c0950>>]
kwargs = {'item': <Function test_n1_import_error>}
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
item = <Function test_n1_import_error>
def pytest_runtest_call(item):
_update_current_test_var(item, "call")
sys.last_type, sys.last_value, sys.last_traceback = (None, None, None)
try:
> item.runtest()
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/runner.py:117:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Function test_n1_import_error>
def runtest(self):
""" execute the underlying test function. """
> self.ihook.pytest_pyfunc_call(pyfuncitem=self)
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/python.py:1423:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_HookCaller 'pytest_pyfunc_call'>, args = (), kwargs = {'pyfuncitem': <Function test_n1_import_error>}, notincall = set()
def __call__(self, *args, **kwargs):
if args:
raise TypeError("hook calling supports only keyword arguments")
assert not self.is_historic()
if self.spec and self.spec.argnames:
notincall = (
set(self.spec.argnames) - set(["__multicall__"]) - set(kwargs.keys())
)
if notincall:
warnings.warn(
"Argument(s) {} which are declared in the hookspec "
"can not be found in this hook call".format(tuple(notincall)),
stacklevel=2,
)
> return self._hookexec(self, self.get_hookimpls(), kwargs)
/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/hooks.py:289:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.config.PytestPluginManager object at 0x7fc6453195d0>, hook = <_HookCaller 'pytest_pyfunc_call'>
methods = [<HookImpl plugin_name='python', plugin=<module '_pytest.python' from '/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-pyt...'/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/skipping.py'>>]
kwargs = {'pyfuncitem': <Function test_n1_import_error>}
def _hookexec(self, hook, methods, kwargs):
# called from all hookcaller instances.
# enable_tracing will set its own wrapping function at self._inner_hookexec
> return self._inner_hookexec(hook, methods, kwargs)
/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py:87:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
hook = <_HookCaller 'pytest_pyfunc_call'>
methods = [<HookImpl plugin_name='python', plugin=<module '_pytest.python' from '/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-pyt...'/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/skipping.py'>>]
kwargs = {'pyfuncitem': <Function test_n1_import_error>}
self._inner_hookexec = lambda hook, methods, kwargs: hook.multicall(
methods,
kwargs,
> firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
)
/nix/store/icib2hc4ppjknvgx43axfn0554ypghcs-python3.7-pluggy-0.12.0/lib/python3.7/site-packages/pluggy/manager.py:81:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyfuncitem = <Function test_n1_import_error>
@hookimpl(trylast=True)
def pytest_pyfunc_call(pyfuncitem):
def async_warn():
msg = "async def functions are not natively supported and have been skipped.\n"
msg += "You need to install a suitable plugin for your async framework, for example:\n"
msg += " - pytest-asyncio\n"
msg += " - pytest-trio\n"
msg += " - pytest-tornasync"
warnings.warn(PytestUnhandledCoroutineWarning(msg.format(pyfuncitem.nodeid)))
skip(msg="async def function and no async plugin installed (see warnings)")
testfunction = pyfuncitem.obj
if iscoroutinefunction(testfunction) or (
sys.version_info >= (3, 6) and inspect.isasyncgenfunction(testfunction)
):
async_warn()
funcargs = pyfuncitem.funcargs
testargs = {arg: funcargs[arg] for arg in pyfuncitem._fixtureinfo.argnames}
> result = testfunction(**testargs)
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/python.py:170:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <acceptance_test.TestDistribution object at 0x7fc644001290>, testdir = <Testdir local('/run/user/1000/pytest-of-freddy/pytest-3/test_n1_import_error0')>
def test_n1_import_error(self, testdir):
p1 = testdir.makepyfile(
"""
import __import_of_missing_module
def test_import():
pass
"""
)
> result = testdir.runpytest(p1, "-n1")
/tmp/build/pytest-xdist-1.28.0/testing/acceptance_test.py:41:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Testdir local('/run/user/1000/pytest-of-freddy/pytest-3/test_n1_import_error0')>
args = [local('/run/user/1000/pytest-of-freddy/pytest-3/test_n1_import_error0/test_n1_import_error.py'), '-n1', '--basetemp=/run/user/1000/pytest-of-freddy/pytest-3/basetemp'], kwargs = {}
def runpytest(self, *args, **kwargs):
"""Run pytest inline or in a subprocess, depending on the command line
option "--runpytest" and return a :py:class:`RunResult`.
"""
args = self._ensure_basetemp(args)
> return self._runpytest_method(*args, **kwargs)
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/pytester.py:892:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Testdir local('/run/user/1000/pytest-of-freddy/pytest-3/test_n1_import_error0')>
args = (local('/run/user/1000/pytest-of-freddy/pytest-3/test_n1_import_error0/test_n1_import_error.py'), '-n1', '--basetemp=/run/user/1000/pytest-of-freddy/pytest-3/basetemp'), kwargs = {}, syspathinsert = False, now = 1566119739.3669105
capture = <[AttributeError("'SysCapture' object has no attribute '_old'") raised in repr()] MultiCapture object at 0x7fc643f0efd0>
out = '============================= test session starts ==============================\nplatform linux -- Python 3.7.4, pyt...eyboardInterrupt use --full-trace)\n=============================== 1 error in 6.63s ===============================\n'
err = ''
def runpytest_inprocess(self, *args, **kwargs):
"""Return result of running pytest in-process, providing a similar
interface to what self.runpytest() provides.
"""
syspathinsert = kwargs.pop("syspathinsert", False)
if syspathinsert:
self.syspathinsert()
now = time.time()
capture = MultiCapture(Capture=SysCapture)
capture.start_capturing()
try:
try:
> reprec = self.inline_run(*args, **kwargs)
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/pytester.py:864:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Testdir local('/run/user/1000/pytest-of-freddy/pytest-3/test_n1_import_error0')>, plugins = [<_pytest.pytester.Testdir.inline_run.<locals>.Collect object at 0x7fc643eb7bd0>], no_reraise_ctrlc = False
args = (local('/run/user/1000/pytest-of-freddy/pytest-3/test_n1_import_error0/test_n1_import_error.py'), '-n1', '--basetemp=/run/user/1000/pytest-of-freddy/pytest-3/basetemp')
finalizers = [<bound method MonkeyPatch.undo of <_pytest.monkeypatch.MonkeyPatch object at 0x7fc643eb7b10>>, <bound method SysModul...fc643ef2690>>, <bound method SysPathsSnapshot.restore of <_pytest.pytester.SysPathsSnapshot object at 0x7fc643eb7b90>>]
def inline_run(self, *args, plugins=(), no_reraise_ctrlc=False):
"""Run ``pytest.main()`` in-process, returning a HookRecorder.
Runs the :py:func:`pytest.main` function to run all of pytest inside
the test process itself. This means it can return a
:py:class:`HookRecorder` instance which gives more detailed results
from that run than can be done by matching stdout/stderr from
:py:meth:`runpytest`.
:param args: command line arguments to pass to :py:func:`pytest.main`
:kwarg plugins: extra plugin instances the ``pytest.main()`` instance should use.
:kwarg no_reraise_ctrlc: typically we reraise keyboard interrupts from the child run. If
True, the KeyboardInterrupt exception is captured.
:return: a :py:class:`HookRecorder` instance
"""
# (maybe a cpython bug?) the importlib cache sometimes isn't updated
# properly between file creation and inline_run (especially if imports
# are interspersed with file creation)
importlib.invalidate_caches()
plugins = list(plugins)
finalizers = []
try:
# Do not load user config (during runs only).
mp_run = MonkeyPatch()
for k, v in self._env_run_update.items():
mp_run.setenv(k, v)
finalizers.append(mp_run.undo)
# Any sys.module or sys.path changes done while running pytest
# inline should be reverted after the test run completes to avoid
# clashing with later inline tests run within the same pytest test,
# e.g. just because they use matching test module names.
finalizers.append(self.__take_sys_modules_snapshot().restore)
finalizers.append(SysPathsSnapshot().restore)
# Important note:
# - our tests should not leave any other references/registrations
# laying around other than possibly loaded test modules
# referenced from sys.modules, as nothing will clean those up
# automatically
rec = []
class Collect:
def pytest_configure(x, config):
rec.append(self.make_hook_recorder(config.pluginmanager))
plugins.append(Collect())
ret = pytest.main(list(args), plugins=plugins)
if len(rec) == 1:
reprec = rec.pop()
else:
class reprec:
pass
reprec.ret = ret
# typically we reraise keyboard interrupts from the child run
# because it's our user requesting interruption of the testing
if ret == ExitCode.INTERRUPTED and not no_reraise_ctrlc:
calls = reprec.getcalls("pytest_keyboard_interrupt")
if calls and calls[-1].excinfo.type == KeyboardInterrupt:
> raise KeyboardInterrupt()
E KeyboardInterrupt
/nix/store/zz56xp59n8zqvnpz7dbphafj3599axv5-python3.7-pytest-5.1.0/lib/python3.7/site-packages/_pytest/pytester.py:845: KeyboardInterrupt
that one will be tough to figure
While attempting to run the tests with Python 3.7 there seem to be a memory leak. I did not have the issue on Python 2.7.
Dependencies in Nix: