Document some minor subtleties in test_util.py by EliahKagan · Pull Request #1749 · gitpython-developers/GitPython
# Disable common chmod functions so the callback can't fix a PermissionError. # Mock out common chmod functions to simulate PermissionError the callback can't # fix. (We leave the corresponding lchmod functions alone. If they're used, it's # more important we detect any failures from inadequate compatibility checks.) mocker.patch.object(os, "chmod") mocker.patch.object(pathlib.Path, "chmod")
_unc_cygpath_pairs = ( (R"\\?\a:\com", "/cygdrive/a/com"), (R"\\?\a:/com", "/cygdrive/a/com"), (R"\\?\UNC\server\D$\Apps", "//server/D$/Apps"), ) """Extended UNC path test cases for cygpath."""
# Mapping of expected failures for the test_cygpath_ok test. _cygpath_ok_xfails = { # From _norm_cygpath_pairs: (R"C:\Users", "/cygdrive/c/Users"): "/proc/cygdrive/c/Users",
# Parameter sets for the test_cygpath_ok test. _cygpath_ok_params = [ ( _xfail_param(*case, reason=f"Returns: {_cygpath_ok_xfails[case]!r}", raises=AssertionError)
@pytest.mark.skipif(sys.platform != "cygwin", reason="Paths specifically for Cygwin.")