docstr: Test that sys.breakpointhook is set to the custom Pdb class once configured, test that
  hook is reset to system value once pytest has been unconfigured
docstr_tok: ["Test","that","sys.breakpointhook","is","set","to","the","custom","Pdb","class","once","configured",",","test","that","hook","is","reset","to","system","value","once","pytest","has","been","unconfigured"]
code: def test_sys_breakpointhook_configure_and_unconfigure(
      self, pytester: Pytester, arg: str
  ) -> None:
      """
      Test that sys.breakpointhook is set to the custom Pdb class once configured, test that
      hook is reset to system value once pytest has been unconfigured
      """
      pytester.makeconftest(
          """
              import sys
              from pytest import hookimpl
              from _pytest.debugging import pytestPDB
  
              def pytest_configure(config):
                  config.add_cleanup(check_restored)
  
              def check_restored():
                  assert sys.breakpointhook == sys.__breakpointhook__
  
              def test_check():
                  assert sys.breakpointhook == pytestPDB.set_trace
          """
      )
      pytester.makepyfile(
          """
              def test_nothing(): pass
          """
      )
      args = (arg,) if arg else ()
      result = pytester.runpytest_subprocess(*args)
      result.stdout.fnmatch_lines(["*1 passed in *"])
  
imports: import os
  import sys
  from typing import List
  import _pytest._code
  import pytest
  from _pytest.debugging import _validate_usepdb_cls
  from _pytest.monkeypatch import MonkeyPatch
  from _pytest.pytester import Pytester
label_desc: Use image node_id 1 for calling the TestDebuggingBreakpoints obj's underlying member method code with example usage: obj.test_sys_breakpointhook_configure_and_unconfigure(pytester, arg) without return types