From 77042f77ccbeb87efcdd2ab3db49cca8c85cf593 Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Sun, 26 Dec 2021 20:52:14 +0100 Subject: [PATCH] Remove breakpoint support checking since all python versions support it. --- testing/test_debugging.py | 27 --------------------------- 1 file changed, 27 deletions(-) diff --git a/testing/test_debugging.py b/testing/test_debugging.py index f3c271710..a95b542ad 100644 --- a/testing/test_debugging.py +++ b/testing/test_debugging.py @@ -8,14 +8,6 @@ from _pytest.debugging import _validate_usepdb_cls from _pytest.monkeypatch import MonkeyPatch from _pytest.pytester import Pytester -try: - # Type ignored for Python <= 3.6. - breakpoint # type: ignore -except NameError: - SUPPORTS_BREAKPOINT_BUILTIN = False -else: - SUPPORTS_BREAKPOINT_BUILTIN = True - _ENVIRON_PYTHONBREAKPOINT = os.environ.get("PYTHONBREAKPOINT", "") @@ -911,13 +903,6 @@ class TestPDB: class TestDebuggingBreakpoints: - def test_supports_breakpoint_module_global(self) -> None: - """Test that supports breakpoint global marks on Python 3.7+.""" - assert SUPPORTS_BREAKPOINT_BUILTIN is True - - @pytest.mark.skipif( - not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin" - ) @pytest.mark.parametrize("arg", ["--pdb", ""]) def test_sys_breakpointhook_configure_and_unconfigure( self, pytester: Pytester, arg: str @@ -951,9 +936,6 @@ class TestDebuggingBreakpoints: result = pytester.runpytest_subprocess(*args) result.stdout.fnmatch_lines(["*1 passed in *"]) - @pytest.mark.skipif( - not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin" - ) def test_pdb_custom_cls(self, pytester: Pytester, custom_debugger_hook) -> None: p1 = pytester.makepyfile( """ @@ -968,9 +950,6 @@ class TestDebuggingBreakpoints: assert custom_debugger_hook == ["init", "set_trace"] @pytest.mark.parametrize("arg", ["--pdb", ""]) - @pytest.mark.skipif( - not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin" - ) def test_environ_custom_class( self, pytester: Pytester, custom_debugger_hook, arg: str ) -> None: @@ -1001,9 +980,6 @@ class TestDebuggingBreakpoints: result = pytester.runpytest_subprocess(*args) result.stdout.fnmatch_lines(["*1 passed in *"]) - @pytest.mark.skipif( - not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin" - ) @pytest.mark.skipif( not _ENVIRON_PYTHONBREAKPOINT == "", reason="Requires breakpoint() default value", @@ -1024,9 +1000,6 @@ class TestDebuggingBreakpoints: assert "reading from stdin while output" not in rest TestPDB.flush(child) - @pytest.mark.skipif( - not SUPPORTS_BREAKPOINT_BUILTIN, reason="Requires breakpoint() builtin" - ) def test_pdb_not_altered(self, pytester: Pytester) -> None: p1 = pytester.makepyfile( """