summaryrefslogtreecommitdiff
path: root/changelog
diff options
context:
space:
mode:
authorDaniel Hahler <git@thequod.de>2017-07-26 17:18:29 +0200
committerDaniel Hahler <git@thequod.de>2018-10-25 13:28:24 +0200
commita4ea66cb1fcbb8a7723c764d67a817a0afdee36d (patch)
tree00656f0edf09b9a92bd7b2d16e5c06915806139a /changelog
parent65b97c2f41315de1b39fe9f9595727ec3b327077 (diff)
downloadpytest-a4ea66cb1fcbb8a7723c764d67a817a0afdee36d.tar.gz
pdb: resume capturing after `continue`
After `pdb.set_trace()` capturing is turned off. This patch resumes it after using the `continue` (or `c` / `cont`) command. Store _pytest_capman on the class, for pdbpp's do_debug hack to keep it. Without this, `debug …` would fail like this: /usr/lib/python3.6/cmd.py:217: in onecmd return func(arg) .venv/lib/python3.6/site-packages/pdb.py:608: in do_debug return orig_do_debug(self, arg) /usr/lib/python3.6/pdb.py:1099: in do_debug sys.call_tracing(p.run, (arg, globals, locals)) /usr/lib/python3.6/bdb.py:434: in run exec(cmd, globals, locals) /usr/lib/python3.6/bdb.py:51: in trace_dispatch return self.dispatch_line(frame) /usr/lib/python3.6/bdb.py:69: in dispatch_line self.user_line(frame) /usr/lib/python3.6/pdb.py:261: in user_line self.interaction(frame, None) .venv/lib/python3.6/site-packages/pdb.py:203: in interaction self.setup(frame, traceback) E AttributeError: 'PytestPdb' object has no attribute '_pytest_capman' - add pytest_leave_pdb hook - fixes test_pdb_interaction_capturing_twice: would fail on master now, but works here
Diffstat (limited to 'changelog')
-rw-r--r--changelog/2619.feature.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/changelog/2619.feature.rst b/changelog/2619.feature.rst
new file mode 100644
index 000000000..df8137a66
--- /dev/null
+++ b/changelog/2619.feature.rst
@@ -0,0 +1 @@
+Resume capturing output after ``continue`` with ``__import__("pdb").set_trace()``.