summaryrefslogtreecommitdiff
path: root/doc/en/usage.rst
diff options
context:
space:
mode:
authorRonny Pfannschmidt <opensource@ronnypfannschmidt.de>2018-04-10 07:15:29 +0200
committerGitHub <noreply@github.com>2018-04-10 07:15:29 +0200
commit2241c98b18cbc2c9ac26b94a07872610cfb36da3 (patch)
tree9512a04ae38b44717c2db6c90a71b6fddfa94c8e /doc/en/usage.rst
parent715337011be81c721a35d0056a352d7cdc2731ec (diff)
parent0762666bd116d92b55f746cde8e25e965ea2912b (diff)
downloadpytest-2241c98b18cbc2c9ac26b94a07872610cfb36da3.tar.gz
Merge pull request #3331 from tonybaloney/breakpoint_support
Support for the new builtin breakpoint function in Python 3.7
Diffstat (limited to 'doc/en/usage.rst')
-rw-r--r--doc/en/usage.rst14
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/en/usage.rst b/doc/en/usage.rst
index 9b6db82c5..3d5b0536e 100644
--- a/doc/en/usage.rst
+++ b/doc/en/usage.rst
@@ -189,6 +189,20 @@ in your code and pytest automatically disables its output capture for that test:
for test output occurring after you exit the interactive PDB_ tracing session
and continue with the regular test run.
+
+.. _`breakpoint-builtin`:
+
+Using the builtin breakpoint function
+-------------------------------------
+
+Python 3.7 introduces a builtin ``breakpoint()`` function.
+Pytest supports the use of ``breakpoint()`` with the following behaviours:
+
+ - When ``breakpoint()`` is called and ``PYTHONBREAKPOINT`` is set to the default value, pytest will use the custom internal PDB trace UI instead of the system default ``Pdb``.
+ - When tests are complete, the system will default back to the system ``Pdb`` trace UI.
+ - If ``--pdb`` is called on execution of pytest, the custom internal Pdb trace UI is used on ``bothbreakpoint()`` and failed tests/unhandled exceptions.
+ - If ``--pdbcls`` is used, the custom class debugger will be executed when a test fails (as expected within existing behaviour), but also when ``breakpoint()`` is called from within a test, the custom class debugger will be instantiated.
+
.. _durations:
Profiling test execution duration