def test_wraps_perm_error_if_enabled(self, mocker, permission_error_tmpdir):
        """rmtree wraps PermissionError on Windows when HIDE_WINDOWS_KNOWN_ERRORS is
        true."""
        self._patch_for_wrapping_test(mocker, True)

        with pytest.raises(SkipTest):
            rmtree(permission_error_tmpdir)
rmtree wraps PermissionError on Windows when HIDE_WINDOWS_KNOWN_ERRORS is
        true.
test/test_util.py