Skip to content

Instantly share code, notes, and snippets.

@adborden
Last active October 4, 2016 19:09
Show Gist options
  • Save adborden/376f2dd3defae8fced33b655913e5f91 to your computer and use it in GitHub Desktop.
Save adborden/376f2dd3defae8fced33b655913e5f91 to your computer and use it in GitHub Desktop.
============================= test session starts ==============================
platform linux -- Python 3.4.5, pytest-3.0.3, py-1.4.31, pluggy-0.4.0
rootdir: /home/adborden/projects/fec/pytest-crash, inifile:
collected 1 items
test_pytest_crash.py
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/main.py", line 96, in wrap_session
INTERNALERROR> session.exitstatus = doit(config, session) or 0
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/main.py", line 131, in _main
INTERNALERROR> config.hook.pytest_runtestloop(session=session)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
INTERNALERROR> _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/main.py", line 152, in pytest_runtestloop
INTERNALERROR> item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
INTERNALERROR> _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
INTERNALERROR> return _wrapped_call(hook_impl.function(*args), self.execute)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 254, in _wrapped_call
INTERNALERROR> return call_outcome.get_result()
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 279, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
INTERNALERROR> self.result = func()
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/runner.py", line 66, in pytest_runtest_protocol
INTERNALERROR> runtestprotocol(item, nextitem=nextitem)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/runner.py", line 79, in runtestprotocol
INTERNALERROR> reports.append(call_and_report(item, "call", log))
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/runner.py", line 135, in call_and_report
INTERNALERROR> report = hook.pytest_runtest_makereport(item=item, call=call)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
INTERNALERROR> return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 339, in _hookexec
INTERNALERROR> return self._inner_hookexec(hook, methods, kwargs)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 334, in <lambda>
INTERNALERROR> _MultiCall(methods, kwargs, hook.spec_opts).execute()
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 613, in execute
INTERNALERROR> return _wrapped_call(hook_impl.function(*args), self.execute)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 250, in _wrapped_call
INTERNALERROR> wrap_controller.send(call_outcome)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/skipping.py", line 222, in pytest_runtest_makereport
INTERNALERROR> rep = outcome.get_result()
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 279, in get_result
INTERNALERROR> raise ex[1].with_traceback(ex[2])
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 265, in __init__
INTERNALERROR> self.result = func()
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/vendored_packages/pluggy.py", line 614, in execute
INTERNALERROR> res = hook_impl.function(*args)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/runner.py", line 272, in pytest_runtest_makereport
INTERNALERROR> longrepr = item.repr_failure(excinfo)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/python.py", line 587, in repr_failure
INTERNALERROR> return self._repr_failure_py(excinfo, style=style)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/python.py", line 580, in _repr_failure_py
INTERNALERROR> style=style)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/main.py", line 433, in _repr_failure_py
INTERNALERROR> style=style, tbfilter=tbfilter)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/_code/code.py", line 423, in getrepr
INTERNALERROR> return fmt.repr_excinfo(self)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/_code/code.py", line 631, in repr_excinfo
INTERNALERROR> excinfo = ExceptionInfo((type(e), e, e.__traceback__))
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/_code/code.py", line 373, in __init__
INTERNALERROR> self.traceback = _pytest._code.Traceback(self.tb, excinfo=self)
INTERNALERROR> File "/home/adborden/.pyenv/versions/3.4.5/envs/pytest-crash/lib/python3.4/site-packages/_pytest/_code/code.py", line 270, in __init__
INTERNALERROR> list.__init__(self, tb)
INTERNALERROR> TypeError: 'NoneType' object is not iterable
========================= no tests ran in 0.18 seconds =========================
from multiprocessing import Pool
def process_task(task):
# Maybe you are calling into a Mock service which has assertions
assert False
def multitask_job():
tasks = [1]
with Pool(processes=1, maxtasksperchild=1) as pool:
pool.map(process_task, tasks, chunksize=1)
def test_multitask_job():
multitask_job()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment