diff --git a/testing/code/test_excinfo.py b/testing/code/test_excinfo.py index fc60ae9ac9..4ff766a833 100644 --- a/testing/code/test_excinfo.py +++ b/testing/code/test_excinfo.py @@ -964,8 +964,8 @@ def raiseos(): upframe = sys._getframe().f_back assert upframe is not None if upframe.f_code.co_name == "_makepath": - # Only raise with expected calls, but not via e.g. inspect for - # py38-windows. + # Only raise with expected calls, and not accidentally via 'inspect' + # See 79ae86cc3f76d69460e1c7beca4ce95e68ab80a6 raised += 1 raise OSError(2, "custom_oserror") return orig_path_cwd()