Skip to content

Commit 77042f7

Browse files
committed
Remove breakpoint support checking since all python versions support it.
1 parent 4009150 commit 77042f7

File tree

1 file changed

+0
-27
lines changed

1 file changed

+0
-27
lines changed

testing/test_debugging.py

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,6 @@
88
from _pytest.monkeypatch import MonkeyPatch
99
from _pytest.pytester import Pytester
1010

11-
try:
12-
# Type ignored for Python <= 3.6.
13-
breakpoint # type: ignore
14-
except NameError:
15-
SUPPORTS_BREAKPOINT_BUILTIN = False
16-
else:
17-
SUPPORTS_BREAKPOINT_BUILTIN = True
18-
1911

2012
_ENVIRON_PYTHONBREAKPOINT = os.environ.get("PYTHONBREAKPOINT", "")
2113

@@ -911,13 +903,6 @@ def test_foo():
911903

912904

913905
class TestDebuggingBreakpoints:
914-
def test_supports_breakpoint_module_global(self) -> None:
915-
"""Test that supports breakpoint global marks on Python 3.7+."""
916-
assert SUPPORTS_BREAKPOINT_BUILTIN is True
917-
918-
@pytest.mark.skipif(
919-
not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin"
920-
)
921906
@pytest.mark.parametrize("arg", ["--pdb", ""])
922907
def test_sys_breakpointhook_configure_and_unconfigure(
923908
self, pytester: Pytester, arg: str
@@ -951,9 +936,6 @@ def test_nothing(): pass
951936
result = pytester.runpytest_subprocess(*args)
952937
result.stdout.fnmatch_lines(["*1 passed in *"])
953938

954-
@pytest.mark.skipif(
955-
not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin"
956-
)
957939
def test_pdb_custom_cls(self, pytester: Pytester, custom_debugger_hook) -> None:
958940
p1 = pytester.makepyfile(
959941
"""
@@ -968,9 +950,6 @@ def test_nothing():
968950
assert custom_debugger_hook == ["init", "set_trace"]
969951

970952
@pytest.mark.parametrize("arg", ["--pdb", ""])
971-
@pytest.mark.skipif(
972-
not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin"
973-
)
974953
def test_environ_custom_class(
975954
self, pytester: Pytester, custom_debugger_hook, arg: str
976955
) -> None:
@@ -1001,9 +980,6 @@ def test_nothing(): pass
1001980
result = pytester.runpytest_subprocess(*args)
1002981
result.stdout.fnmatch_lines(["*1 passed in *"])
1003982

1004-
@pytest.mark.skipif(
1005-
not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin"
1006-
)
1007983
@pytest.mark.skipif(
1008984
not _ENVIRON_PYTHONBREAKPOINT == "",
1009985
reason="Requires breakpoint() default value",
@@ -1024,9 +1000,6 @@ def test_1():
10241000
assert "reading from stdin while output" not in rest
10251001
TestPDB.flush(child)
10261002

1027-
@pytest.mark.skipif(
1028-
not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin"
1029-
)
10301003
def test_pdb_not_altered(self, pytester: Pytester) -> None:
10311004
p1 = pytester.makepyfile(
10321005
"""

0 commit comments

Comments
 (0)