[Pytest-commit] Issue #593: xdist incompatible with multiprocessing on Python 3.4 (hpk42/pytest)
Martin Myrseth
issues-reply at bitbucket.org
Thu Sep 18 11:49:33 CEST 2014
New issue 593: xdist incompatible with multiprocessing on Python 3.4
https://bitbucket.org/hpk42/pytest/issue/593/xdist-incompatible-with-multiprocessing-on
Martin Myrseth:
It seems like importing `multiprocessing` while running `py.test -f` breaks on Python 3.4.0.
A minimal reproduction:
```
#!python
import multiprocessing
def test_case():
assert True
```
This works as expected without the unused multiprocessing import.
Python presents the following stack trace:
```
#!
==================================== ERRORS ====================================
___________________________ ERROR collecting test.py ___________________________
test.py:1: in <module>
import multiprocessing
/usr/lib/python3.4/multiprocessing/__init__.py:16: in <module>
from . import context
/usr/lib/python3.4/multiprocessing/context.py:5: in <module>
from . import process
/usr/lib/python3.4/multiprocessing/process.py:316: in <module>
_current_process = _MainProcess()
/usr/lib/python3.4/multiprocessing/process.py:303: in __init__
self._config = {'authkey': AuthenticationString(os.urandom(32)),
E RuntimeError: Failed to read 32 bytes from /dev/urandom
```
Pytest version dump:
```
#!bash
(pytest-xdist) $ py.test --version
This is pytest version 2.6.2, imported from <..>/.virtualenvs/pytest-xdist/lib/python3.4/site-packages/pytest.py
setuptools registered plugins:
pytest-xdist-1.10 at <..>/.virtualenvs/pytest-xdist/lib/python3.4/site-packages/xdist/plugin.py
```
More information about the pytest-commit
mailing list