diff options
author | Anthony Shaw <anthonyshaw@apache.org> | 2018-03-22 17:27:28 +1100 |
---|---|---|
committer | Anthony Shaw <anthonyshaw@apache.org> | 2018-03-22 17:27:28 +1100 |
commit | 3bca983a95d935b3c91130a1397e910fb460f338 (patch) | |
tree | 9f2638fb8d8550089fbb8338c18b95cbaee92a0b /_pytest | |
parent | 9edcb7edc643feafd91ebe0922d02bcafaceb1fb (diff) | |
download | pytest-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.py | 6 |
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") |