Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run some Windows environment variable tests only on Windows #1774

Merged
merged 2 commits into from
Dec 19, 2023

Commits on Dec 19, 2023

  1. Use Path.touch to create files for rmtree tests

    It's not necessary to use `write_bytes(b"")`, because pathlib.Path
    has `touch()`.
    EliahKagan committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    b12a54a View commit details
    Browse the repository at this point in the history
  2. Run test_env_vars_for_windows_tests only on Windows

    This skips the tests of how the HIDE_WINDOWS_KNOWN_ERRORS and
    HIDE_WINDOWS_FREEZE_ERRORS environment variables affect the
    same-named attributes of git.util, except when testing on Windows.
    
    These are parsed only to ever set a True value on Windows, but
    checking that this is the case is less important ever since
    git.util.rmtree was changed to not check HIDE_WINDOWS_KNOWN_ERRORS
    on other systems (and this is covered in other tests).
    
    Setting the variables to True on non-Windows systems would still
    have a bad effect on the tests themselves, some of which use them
    as skip or xfail conditions separate from the skipping logic in
    git.util.rmtree. However, this is effectively using them as part of
    the test suite (which they were initially meant for and which they
    may eventually go back to being, for gitpython-developers#790), where they would not
    ordinarily have tests.
    
    The benefit and motivation for running these tests only on Windows
    is that the tests can be simplified, so that their parameter sets
    are no longer confusing. That change is also made here.
    EliahKagan committed Dec 19, 2023
    Configuration menu
    Copy the full SHA
    6a8ed70 View commit details
    Browse the repository at this point in the history