py.test fails to coexist with multiprocessing

Issue #18 resolved
Anders Qvist created an issue

Given: {{{

!python

import multiprocessing def test_foo(): x = multiprocessing.Manager() }}} py.test -s works, but py.test fails thus:

{{{

!output

PYTHONPATH=../py-trunk python2.6 ../py-trunk/py/bin/py.test test_foo.py --tb=short inserting into sys.path: /home/quest/projects/py-trunk =============================== test session starts ================================ python: platform linux2 -- Python 2.6.1 test object 1: /home/quest/projects/r2d2/test_foo.py

test_foo.py F

===================================== FAILURES ===================================== _____ test_foo _____ File "test_foo.py", line 4, in test_foo x = multiprocessing.Manager() File "init.py", line 97, in Manager m.start() File "managers.py", line 499, in start self._address = reader.recv() E EOFError --------------------------------- Captured stderr ---------------------------------- Process SyncManager-1: Traceback (most recent call last): File "/usr/lib/python2.6/multiprocessing/process.py", line 223, in _bootstrap os.close(sys.stdin.fileno()) AttributeError: DontReadFromInput instance has no attribute 'fileno' ============================= 1 failed in 0.09 seconds ============================= }}}

Honestly, I don't follow exactly what multiprocessing is trying to achieve, so I'm not sure who's most at fault.

Comments (4)

  1. Holger Krekel repo owner

    ups, this issue should already be fiexed a while ago but apparently i forgot to update the issue somehow. Can you update your py lib copy (current is 1.0.0b7) and verify?

  2. Former user Account Deleted

    Hi,

    I am running Python 2.6.4 [GCC 4.4.1] on linux2 and py-1.2.1-py2.6.egg/ and I have run into similar issues with my tests. Easy reproduction of my problem:

    Process SyncManager-1:
    Traceback (most recent call last):
      File "/usr/lib/python2.6/multiprocessing/process.py", line 223, in _bootstrap
        sys.stdin.close()
    AttributeError: DontReadFromInput instance has no attribute 'close'
    

    provide the example above:

    import multiprocessing
    def test_foo():
            x = multiprocessing.Manager()
    

    py.test test_foo.py -s runs py.test test_foo.py fails

    Thanks, Max

  3. Log in to comment