Skip to content

Make clear every test's status in every CI run #1679

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

Merged
merged 32 commits into from
Sep 26, 2023
Merged
Changes from 1 commit
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
45773c2
Instrument workflows to investigate skipped tests
EliahKagan Sep 7, 2023
6fbe511
Show version and platform info in one place
EliahKagan Sep 13, 2023
bd3307a
Make "Update PyPA packages" step clearer
EliahKagan Sep 13, 2023
680d795
Show all the failures
EliahKagan Sep 13, 2023
75cf540
Keep sugar for local use, but use instafail on CI
EliahKagan Sep 14, 2023
eb56e7b
Pass -v twice to see full skip reasons
EliahKagan Sep 14, 2023
9c7ff1e
Force pytest color output on CI
EliahKagan Sep 14, 2023
0eb38bc
Fix test_blocking_lock_file for cygwin
EliahKagan Sep 15, 2023
715dba4
Run cygpath tests on Cygwin, not native Windows
EliahKagan Sep 14, 2023
d6a2d28
Mark some cygpath tests xfail
EliahKagan Sep 17, 2023
881456b
Run test_commit_msg_hook_success on more systems
EliahKagan Sep 17, 2023
c6a586a
No longer skip test_index_mutation on Cygwin
EliahKagan Sep 17, 2023
fc02230
Report encoding error in test_add_unicode as error
EliahKagan Sep 24, 2023
203da23
Add a few FIXMEs re: better use of xfail
EliahKagan Sep 24, 2023
cf5f1dc
Report <2.5.1 in test_linked_worktree_traversal as error
EliahKagan Sep 25, 2023
8923236
Change skipIf(not ...) to skipUnless(...)
EliahKagan Sep 25, 2023
b198bf1
Express known test_depth failure with xfail
EliahKagan Sep 25, 2023
cd175a5
Remove no-effect `@skipIf` on test_untracked_files
EliahKagan Sep 25, 2023
f38cc00
Make 2 more too-low git version skips into errors
EliahKagan Sep 25, 2023
8fd56e7
Update test_root_module Windows skip reason
EliahKagan Sep 25, 2023
c1798f5
Change test_root_module Windows skip to xfail
EliahKagan Sep 25, 2023
ba56752
Update test_git_submodules_and_add_sm_with_new_commit skip reason
EliahKagan Sep 25, 2023
8704d1b
Change test_git_submodules_and_add_sm_with_new_commit Windows skip to…
EliahKagan Sep 25, 2023
1d6abdc
Run the tests in test_tree on Windows
EliahKagan Sep 25, 2023
5609faa
Add missing raises keyword for test_depth xfail
EliahKagan Sep 25, 2023
ed95e8e
Consolidate test_repo module import statements
EliahKagan Sep 25, 2023
ceb4dd3
Show more CI system information
EliahKagan Sep 25, 2023
3276aac
Use Cygwin's bash and git for more CI steps
EliahKagan Sep 25, 2023
5d40976
Try to work in all LF on Cygwin CI
EliahKagan Sep 25, 2023
dda4286
Consistent formatting style across all workflows
EliahKagan Sep 25, 2023
3007abc
Remove the recently added "Limit $PATH" step
EliahKagan Sep 26, 2023
4860f70
Further reduce differences between test workflows
EliahKagan Sep 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
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.
  • Loading branch information
EliahKagan committed Sep 25, 2023
commit cd175a598ed457833bc06adba776e2bbb1d9014b
14 changes: 2 additions & 12 deletions test/test_repo.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
import pickle
import sys
import tempfile
from unittest import mock, skipIf, SkipTest, skip
from unittest import mock, SkipTest, skip

import pytest

Expand Down Expand Up @@ -42,7 +42,7 @@
)
from git.repo.fun import touch
from test.lib import TestBase, with_rw_repo, fixture
from git.util import HIDE_WINDOWS_KNOWN_ERRORS, cygpath
from git.util import cygpath
from test.lib import with_rw_directory
from git.util import join_path_native, rmtree, rmfile, bin_to_hex

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

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