Skip to content

Commit cd175a5

Browse files
committed
Remove no-effect @skipIf on test_untracked_files
It looked like test_untracked_files was sometimes skipped, and specifically that it would be skipped on Cygwin. But the `@skipIf` on it had the condition: HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin() HIDE_WINDOWS_KNOWN_ERRORS can only ever be true if it is set to a truthy value directly (not an intended use as it's a "constant"), or on native Windows systems: no matter how the environment variable related to it is set, it's only checked if is_win, which is set by checking os.name, which is only "nt" on native Windows systems, not Cygwin. So whenever HIDE_WINDOWS_KNOWN_ERRORS is true Git.is_cygwin() will be false. Thus this condition is never true and the test was never being skipped anyway: it was running and passing on Cygwin.
1 parent b198bf1 commit cd175a5

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

Diff for: test/test_repo.py

+2-12
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import pickle
1414
import sys
1515
import tempfile
16-
from unittest import mock, skipIf, SkipTest, skip
16+
from unittest import mock, SkipTest, skip
1717

1818
import pytest
1919

@@ -42,7 +42,7 @@
4242
)
4343
from git.repo.fun import touch
4444
from test.lib import TestBase, with_rw_repo, fixture
45-
from git.util import HIDE_WINDOWS_KNOWN_ERRORS, cygpath
45+
from git.util import cygpath
4646
from test.lib import with_rw_directory
4747
from git.util import join_path_native, rmtree, rmfile, bin_to_hex
4848

@@ -764,16 +764,6 @@ def test_blame_accepts_rev_opts(self, git):
764764
self.rorepo.blame("HEAD", "README.md", rev_opts=["-M", "-C", "-C"])
765765
git.assert_called_once_with(*expected_args, **boilerplate_kwargs)
766766

767-
@skipIf(
768-
HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(),
769-
"""FIXME: File "C:\\projects\\gitpython\\git\\cmd.py", line 671, in execute
770-
raise GitCommandError(command, status, stderr_value, stdout_value)
771-
GitCommandError: Cmd('git') failed due to: exit code(128)
772-
cmdline: git add 1__��ava verb��ten 1_test _myfile 1_test_other_file
773-
1_��ava-----verb��ten
774-
stderr: 'fatal: pathspec '"1__çava verböten"' did not match any files'
775-
""",
776-
)
777767
@with_rw_repo("HEAD", bare=False)
778768
def test_untracked_files(self, rwrepo):
779769
for run, repo_add in enumerate((rwrepo.index.add, rwrepo.git.add)):

0 commit comments

Comments
 (0)