summaryrefslogtreecommitdiff
path: root/_pytest
diff options
context:
space:
mode:
authorAnthony Shaw <anthonyshaw@apache.org>2018-03-22 17:27:28 +1100
committerAnthony Shaw <anthonyshaw@apache.org>2018-03-22 17:27:28 +1100
commit3bca983a95d935b3c91130a1397e910fb460f338 (patch)
tree9f2638fb8d8550089fbb8338c18b95cbaee92a0b /_pytest
parent9edcb7edc643feafd91ebe0922d02bcafaceb1fb (diff)
downloadpytest-3bca983a95d935b3c91130a1397e910fb460f338.tar.gz
add a module global for whether the current runtime supports the builtin breakpoint function
Diffstat (limited to '_pytest')
-rw-r--r--_pytest/debugging.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/_pytest/debugging.py b/_pytest/debugging.py
index 43472f23b..bb21a9e0e 100644
--- a/_pytest/debugging.py
+++ b/_pytest/debugging.py
@@ -4,6 +4,12 @@ import pdb
import sys
from doctest import UnexpectedException
+try:
+ from builtins import breakpoint # noqa
+ SUPPORTS_BREAKPOINT_BUILTIN = True
+except ImportError:
+ SUPPORTS_BREAKPOINT_BUILTIN = False
+
def pytest_addoption(parser):
group = parser.getgroup("general")