[Pytest-commit] Issue #689: Allow for pytester to not redirect stdio (ipdb.set_trace() etc) (pytest-dev/pytest)
Daniel Hahler
issues-reply at bitbucket.org
Fri Feb 27 20:11:43 CET 2015
New issue 689: Allow for pytester to not redirect stdio (ipdb.set_trace() etc)
https://bitbucket.org/pytest-dev/pytest/issue/689/allow-for-pytester-to-not-redirect-stdio
Daniel Hahler:
I would like to use `ipbd.set_trace()` (interactively) from a test, like this:
```
#!python
def test_runpytest_ipdb(self, testdir):
testdir.makepyfile("""
def test_foo():
import ipdb; ipdb.set_trace()
""")
result = testdir.runpytest('-s')
```
When running this test (using `py.test -s`), the test will "hang"; nothing
gets displayed.
You can interact with the debugger, and quit it using `Ctrl-d`.
More information about the pytest-commit
mailing list