def test_does_not_wrap_perm_error_unless_enabled(self, mocker, permission_error_tmpdir, hide_windows_known_errors):
        """rmtree does not wrap PermissionError on non-Windows systems or when
        HIDE_WINDOWS_KNOWN_ERRORS is false."""
        self._patch_for_wrapping_test(mocker, hide_windows_known_errors)

        with pytest.raises(PermissionError):
            try:
                rmtree(permission_error_tmpdir)
            except SkipTest as ex:
                pytest.fail(f"rmtree unexpectedly attempts skip: {ex!r}")
rmtree does not wrap PermissionError on non-Windows systems or when
        HIDE_WINDOWS_KNOWN_ERRORS is false.
test/test_util.py