Originally reported by: Robert Buchholz (BitBucket: rbuchholz, GitHub: rbuchholz)
Given a test
#!python
...
def test_should_not_create_duplicate_entries(self):
from pdb import set_trace ; set_trace()
...
I get
#!shell
(virtualenv)2 rbu@localhost ~/code $ py.test
...
>>>>>>>>>>>>>>>>>>> PDB set_trace (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>
> some_test.py(48)test_should_not_create_duplicate_entries()
-> self.assert_increases_by(filler.fill, indexCache.query.count, 1)
(Pdb) c
................
(virtualenv)rbu@localhost ~/code $ py.test --looponfail
...
>>>>>>>>>>>>>>>>>>> PDB set_trace (IO-capturing turned off) >>>>>>>>>>>>>>>>>>>>
> some_test.py(48)test_should_not_create_duplicate_entries()
-> self.assert_increases_by(filler.fill, indexCache.query.count, 1)
(Pdb)
F...............
=================================== FAILURES ===================================
...
> if self.quitting: raise BdbQuit
E BdbQuit
################################ LOOPONFAILING #################################
...
############################# waiting for changes ##############################
### Watching: /home/rbu/code
close failed in file object destructor:
sys.excepthook is missing
lost sys.stderr
This is py.test version 2.4.2, imported from .../pytest-2.4.2-py2.7.egg/pytest.pyc
setuptools registered plugins:
pytest-xdist-1.9 at .../pytest_xdist-1.9-py2.7.egg/xdist/plugin.pyc
_Original comment by_ holger krekel (BitBucket: hpk42, GitHub: hpk42):
pytest-xdist manages a test slave process which collects and runs tests (at the control of the master process). However, it doesn't currently implement "stdout/stderr/stdin" forwarding. So it is this forwarding that is missing for making pdb() work. It's probably not very hard to implement this forwarding but requires understanding of execnet which is the underlying library for managing master-slave communication.
@rbuchholz is actually @rbu on GitHub
Closing as stalled, also this one is rather hard to do propperly