8
8
from _pytest .monkeypatch import MonkeyPatch
9
9
from _pytest .pytester import Pytester
10
10
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
-
19
11
20
12
_ENVIRON_PYTHONBREAKPOINT = os .environ .get ("PYTHONBREAKPOINT" , "" )
21
13
@@ -911,13 +903,6 @@ def test_foo():
911
903
912
904
913
905
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
- )
921
906
@pytest .mark .parametrize ("arg" , ["--pdb" , "" ])
922
907
def test_sys_breakpointhook_configure_and_unconfigure (
923
908
self , pytester : Pytester , arg : str
@@ -951,9 +936,6 @@ def test_nothing(): pass
951
936
result = pytester .runpytest_subprocess (* args )
952
937
result .stdout .fnmatch_lines (["*1 passed in *" ])
953
938
954
- @pytest .mark .skipif (
955
- not SUPPORTS_BREAKPOINT_BUILTIN , reason = "Requires breakpoint() builtin"
956
- )
957
939
def test_pdb_custom_cls (self , pytester : Pytester , custom_debugger_hook ) -> None :
958
940
p1 = pytester .makepyfile (
959
941
"""
@@ -968,9 +950,6 @@ def test_nothing():
968
950
assert custom_debugger_hook == ["init" , "set_trace" ]
969
951
970
952
@pytest .mark .parametrize ("arg" , ["--pdb" , "" ])
971
- @pytest .mark .skipif (
972
- not SUPPORTS_BREAKPOINT_BUILTIN , reason = "Requires breakpoint() builtin"
973
- )
974
953
def test_environ_custom_class (
975
954
self , pytester : Pytester , custom_debugger_hook , arg : str
976
955
) -> None :
@@ -1001,9 +980,6 @@ def test_nothing(): pass
1001
980
result = pytester .runpytest_subprocess (* args )
1002
981
result .stdout .fnmatch_lines (["*1 passed in *" ])
1003
982
1004
- @pytest .mark .skipif (
1005
- not SUPPORTS_BREAKPOINT_BUILTIN , reason = "Requires breakpoint() builtin"
1006
- )
1007
983
@pytest .mark .skipif (
1008
984
not _ENVIRON_PYTHONBREAKPOINT == "" ,
1009
985
reason = "Requires breakpoint() default value" ,
@@ -1024,9 +1000,6 @@ def test_1():
1024
1000
assert "reading from stdin while output" not in rest
1025
1001
TestPDB .flush (child )
1026
1002
1027
- @pytest .mark .skipif (
1028
- not SUPPORTS_BREAKPOINT_BUILTIN , reason = "Requires breakpoint() builtin"
1029
- )
1030
1003
def test_pdb_not_altered (self , pytester : Pytester ) -> None :
1031
1004
p1 = pytester .makepyfile (
1032
1005
"""
0 commit comments