Skip to content

Commit 58076c2

Browse files
authoredSep 26, 2023
Merge pull request #1679 from EliahKagan/verbose-ci
Make clear every test's status in every CI run
2 parents abd445f + 4860f70 commit 58076c2

13 files changed

+119
-130
lines changed
 

‎.github/workflows/cygwin-test.yml

+27-17
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,24 @@ on: [push, pull_request, workflow_dispatch]
55
jobs:
66
build:
77
runs-on: windows-latest
8+
89
strategy:
910
fail-fast: false
11+
1012
env:
1113
CHERE_INVOKING: 1
12-
SHELLOPTS: igncr
1314
TMP: "/tmp"
1415
TEMP: "/tmp"
16+
1517
defaults:
1618
run:
17-
shell: bash.exe --noprofile --norc -exo pipefail -o igncr "{0}"
19+
shell: C:\cygwin\bin\bash.exe --noprofile --norc -exo pipefail -o igncr "{0}"
1820

1921
steps:
2022
- name: Force LF line endings
21-
run: git config --global core.autocrlf input
23+
run: |
24+
git config --global core.autocrlf false # Affects the non-Cygwin git.
25+
shell: bash
2226

2327
- uses: actions/checkout@v4
2428
with:
@@ -29,36 +33,42 @@ jobs:
2933
with:
3034
packages: python39 python39-pip python39-virtualenv git
3135

32-
- name: Show python and git versions
36+
- name: Special configuration for Cygwin's git
3337
run: |
34-
/usr/bin/python --version
35-
/usr/bin/git version
36-
37-
- name: Tell git to trust this repo
38-
run: |
39-
/usr/bin/git config --global --add safe.directory "$(pwd)"
38+
git config --global --add safe.directory "$(pwd)"
39+
git config --global core.autocrlf false
4040
4141
- name: Prepare this repo for tests
4242
run: |
4343
TRAVIS=yes ./init-tests-after-clone.sh
4444
45-
- name: Further prepare git configuration for tests
45+
- name: Set git user identity and command aliases for the tests
4646
run: |
47-
/usr/bin/git config --global user.email "travis@ci.com"
48-
/usr/bin/git config --global user.name "Travis Runner"
47+
git config --global user.email "travis@ci.com"
48+
git config --global user.name "Travis Runner"
4949
# If we rewrite the user's config by accident, we will mess it up
5050
# and cause subsequent tests to fail
5151
cat test/fixtures/.gitconfig >> ~/.gitconfig
5252
5353
- name: Update PyPA packages
5454
run: |
55-
/usr/bin/python -m pip install --upgrade pip setuptools wheel
55+
# Get the latest pip, wheel, and prior to Python 3.12, setuptools.
56+
python -m pip install -U pip $(pip freeze --all | grep -oF setuptools) wheel
5657
5758
- name: Install project and test dependencies
5859
run: |
59-
/usr/bin/python -m pip install ".[test]"
60+
python -m pip install ".[test]"
61+
62+
- name: Show version and platform information
63+
run: |
64+
uname -a
65+
command -v git python
66+
git version
67+
python --version
68+
python -c 'import sys; print(sys.platform)'
69+
python -c 'import os; print(os.name)'
70+
python -c 'import git; print(git.compat.is_win)'
6071
6172
- name: Test with pytest
6273
run: |
63-
set +x
64-
/usr/bin/python -m pytest
74+
python -m pytest --color=yes -p no:sugar --instafail -vv

‎.github/workflows/lint.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ jobs:
77
runs-on: ubuntu-latest
88

99
steps:
10-
- uses: actions/checkout@v4
11-
- uses: actions/setup-python@v4
12-
with:
13-
python-version: "3.x"
14-
- uses: pre-commit/action@v3.0.0
10+
- uses: actions/checkout@v4
11+
12+
- uses: actions/setup-python@v4
13+
with:
14+
python-version: "3.x"
15+
16+
- uses: pre-commit/action@v3.0.0

‎.github/workflows/pythonpackage.yml

+16-14
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ permissions:
1010

1111
jobs:
1212
build:
13-
1413
runs-on: ubuntu-latest
14+
1515
strategy:
1616
fail-fast: false
1717
matrix:
@@ -20,6 +20,7 @@ jobs:
2020
- experimental: false
2121
- python-version: "3.12"
2222
experimental: true
23+
2324
defaults:
2425
run:
2526
shell: /bin/bash --noprofile --norc -exo pipefail {0}
@@ -36,16 +37,11 @@ jobs:
3637
python-version: ${{ matrix.python-version }}
3738
allow-prereleases: ${{ matrix.experimental }}
3839

39-
- name: Show python and git versions
40-
run: |
41-
python --version
42-
git version
43-
4440
- name: Prepare this repo for tests
4541
run: |
4642
TRAVIS=yes ./init-tests-after-clone.sh
4743
48-
- name: Prepare git configuration for tests
44+
- name: Set git user identity and command aliases for the tests
4945
run: |
5046
git config --global user.email "travis@ci.com"
5147
git config --global user.name "Travis Runner"
@@ -55,17 +51,23 @@ jobs:
5551
5652
- name: Update PyPA packages
5753
run: |
58-
python -m pip install --upgrade pip
59-
if pip freeze --all | grep --quiet '^setuptools=='; then
60-
# Python prior to 3.12 ships setuptools. Upgrade it if present.
61-
python -m pip install --upgrade setuptools
62-
fi
63-
python -m pip install --upgrade wheel
54+
# Get the latest pip, wheel, and prior to Python 3.12, setuptools.
55+
python -m pip install -U pip $(pip freeze --all | grep -oF setuptools) wheel
6456
6557
- name: Install project and test dependencies
6658
run: |
6759
pip install ".[test]"
6860
61+
- name: Show version and platform information
62+
run: |
63+
uname -a
64+
command -v git python
65+
git version
66+
python --version
67+
python -c 'import sys; print(sys.platform)'
68+
python -c 'import os; print(os.name)'
69+
python -c 'import git; print(git.compat.is_win)'
70+
6971
- name: Check types with mypy
7072
run: |
7173
mypy -p git
@@ -75,7 +77,7 @@ jobs:
7577

7678
- name: Test with pytest
7779
run: |
78-
pytest
80+
pytest --color=yes -p no:sugar --instafail -vv
7981
continue-on-error: false
8082

8183
- name: Documentation

‎pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
55
[tool.pytest.ini_options]
66
python_files = 'test_*.py'
77
testpaths = 'test' # space separated list of paths from root e.g test tests doc/testing
8-
addopts = '--cov=git --cov-report=term --maxfail=10 --force-sugar --disable-warnings'
8+
addopts = '--cov=git --cov-report=term --disable-warnings'
99
filterwarnings = 'ignore::DeprecationWarning'
1010
# --cov coverage
1111
# --cov-report term # send report to terminal term-missing -> terminal with line numbers html xml

‎test-requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ mypy
55
pre-commit
66
pytest
77
pytest-cov
8+
pytest-instafail
89
pytest-sugar

‎test/test_base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import os
88
import sys
99
import tempfile
10-
from unittest import SkipTest, skipIf
10+
from unittest import skipIf
1111

1212
from git import Repo
1313
from git.objects import Blob, Tree, Commit, TagObject
@@ -126,7 +126,7 @@ def test_add_unicode(self, rw_repo):
126126
try:
127127
file_path.encode(sys.getfilesystemencoding())
128128
except UnicodeEncodeError as e:
129-
raise SkipTest("Environment doesn't support unicode filenames") from e
129+
raise RuntimeError("Environment doesn't support unicode filenames") from e
130130

131131
with open(file_path, "wb") as fp:
132132
fp.write(b"something")

‎test/test_config.py

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ def test_includes_order(self):
100100
# values must be considered as soon as they get them
101101
assert r_config.get_value("diff", "tool") == "meld"
102102
try:
103+
# FIXME: Split this assertion out somehow and mark it xfail (or fix it).
103104
assert r_config.get_value("sec", "var1") == "value1_main"
104105
except AssertionError as e:
105106
raise SkipTest("Known failure -- included values are not in effect right away") from e

‎test/test_fun.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
from stat import S_IFDIR, S_IFREG, S_IFLNK, S_IXUSR
33
from os import stat
44
import os.path as osp
5-
from unittest import SkipTest
65

76
from git import Git
87
from git.index import IndexFile
@@ -279,7 +278,7 @@ def test_linked_worktree_traversal(self, rw_dir):
279278
"""Check that we can identify a linked worktree based on a .git file"""
280279
git = Git(rw_dir)
281280
if git.version_info[:3] < (2, 5, 1):
282-
raise SkipTest("worktree feature unsupported")
281+
raise RuntimeError("worktree feature unsupported (test needs git 2.5.1 or later)")
283282

284283
rw_master = self.rorepo.clone(join_path_native(rw_dir, "master_repo"))
285284
branch = rw_master.create_head("aaaaaaaa")

‎test/test_index.py

+23-19
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,13 @@
77

88
from io import BytesIO
99
import os
10+
import os.path as osp
11+
from pathlib import Path
1012
from stat import S_ISLNK, ST_MODE
11-
import tempfile
12-
from unittest import skipIf
1313
import shutil
14+
import tempfile
15+
16+
import pytest
1417

1518
from git import (
1619
IndexFile,
@@ -28,21 +31,26 @@
2831
from git.index.fun import hook_path
2932
from git.index.typ import BaseIndexEntry, IndexEntry
3033
from git.objects import Blob
31-
from test.lib import TestBase, fixture_path, fixture, with_rw_repo
32-
from test.lib import with_rw_directory
33-
from git.util import Actor, rmtree
34-
from git.util import HIDE_WINDOWS_KNOWN_ERRORS, hex_to_bin
34+
from test.lib import TestBase, fixture, fixture_path, with_rw_directory, with_rw_repo
35+
from git.util import Actor, hex_to_bin, rmtree
3536
from gitdb.base import IStream
3637

37-
import os.path as osp
38-
from git.cmd import Git
38+
HOOKS_SHEBANG = "#!/usr/bin/env sh\n"
3939

40-
from pathlib import Path
4140

42-
HOOKS_SHEBANG = "#!/usr/bin/env sh\n"
41+
def _found_in(cmd, directory):
42+
"""Check if a command is resolved in a directory (without following symlinks)."""
43+
path = shutil.which(cmd)
44+
return path and Path(path).parent == Path(directory)
45+
4346

4447
is_win_without_bash = is_win and not shutil.which("bash.exe")
4548

49+
is_win_with_wsl_bash = is_win and _found_in(
50+
cmd="bash.exe",
51+
directory=Path(os.getenv("WINDIR")) / "System32",
52+
)
53+
4654

4755
def _make_hook(git_dir, name, content, make_exec=True):
4856
"""A helper to create a hook"""
@@ -422,14 +430,6 @@ def _count_existing(self, repo, files):
422430

423431
# END num existing helper
424432

425-
@skipIf(
426-
HIDE_WINDOWS_KNOWN_ERRORS and Git.is_cygwin(),
427-
"""FIXME: File "C:\\projects\\gitpython\\git\\test\\test_index.py", line 642, in test_index_mutation
428-
self.assertEqual(fd.read(), link_target)
429-
AssertionError: '!<symlink>\xff\xfe/\x00e\x00t\x00c\x00/\x00t\x00h\x00a\x00t\x00\x00\x00'
430-
!= '/etc/that'
431-
""",
432-
)
433433
@with_rw_repo("0.1.6")
434434
def test_index_mutation(self, rw_repo):
435435
index = rw_repo.index
@@ -910,7 +910,11 @@ def test_pre_commit_hook_fail(self, rw_repo):
910910
else:
911911
raise AssertionError("Should have caught a HookExecutionError")
912912

913-
@skipIf(HIDE_WINDOWS_KNOWN_ERRORS, "TODO: fix hooks execution on Windows: #703")
913+
@pytest.mark.xfail(
914+
is_win_without_bash or is_win_with_wsl_bash,
915+
reason="Specifically seems to fail on WSL bash (in spite of #1399)",
916+
raises=AssertionError,
917+
)
914918
@with_rw_repo("HEAD", bare=True)
915919
def test_commit_msg_hook_success(self, rw_repo):
916920
commit_message = "commit default head by Frèderic Çaufl€"

‎test/test_repo.py

+5-17
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, skip
1717

1818
import pytest
1919

@@ -41,10 +41,8 @@
4141
UnsafeProtocolError,
4242
)
4343
from git.repo.fun import touch
44-
from test.lib import TestBase, with_rw_repo, fixture
45-
from git.util import HIDE_WINDOWS_KNOWN_ERRORS, cygpath
46-
from test.lib import with_rw_directory
47-
from git.util import join_path_native, rmtree, rmfile, bin_to_hex
44+
from git.util import bin_to_hex, cygpath, join_path_native, rmfile, rmtree
45+
from test.lib import TestBase, fixture, with_rw_directory, with_rw_repo
4846

4947
import os.path as osp
5048

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

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-
)
777765
@with_rw_repo("HEAD", bare=False)
778766
def test_untracked_files(self, rwrepo):
779767
for run, repo_add in enumerate((rwrepo.index.add, rwrepo.git.add)):
@@ -1245,7 +1233,7 @@ def test_merge_base(self):
12451233
def test_is_ancestor(self):
12461234
git = self.rorepo.git
12471235
if git.version_info[:3] < (1, 8, 0):
1248-
raise SkipTest("git merge-base --is-ancestor feature unsupported")
1236+
raise RuntimeError("git merge-base --is-ancestor feature unsupported (test needs git 1.8.0 or later)")
12491237

12501238
repo = self.rorepo
12511239
c1 = "f6aa8d1"
@@ -1293,7 +1281,7 @@ def test_git_work_tree_dotgit(self, rw_dir):
12931281
based on it."""
12941282
git = Git(rw_dir)
12951283
if git.version_info[:3] < (2, 5, 1):
1296-
raise SkipTest("worktree feature unsupported")
1284+
raise RuntimeError("worktree feature unsupported (test needs git 2.5.1 or later)")
12971285

12981286
rw_master = self.rorepo.clone(join_path_native(rw_dir, "master_repo"))
12991287
branch = rw_master.create_head("aaaaaaaa")

‎test/test_submodule.py

+17-20
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import tempfile
88
from pathlib import Path
99
import sys
10-
from unittest import mock, skipIf
10+
from unittest import mock, skipUnless
1111

1212
import pytest
1313

@@ -474,14 +474,13 @@ def test_base_bare(self, rwrepo):
474474
reason="Cygwin GitPython can't find submodule SHA",
475475
raises=ValueError,
476476
)
477-
@skipIf(
477+
@pytest.mark.xfail(
478478
HIDE_WINDOWS_KNOWN_ERRORS,
479-
"""
480-
File "C:\\projects\\gitpython\\git\\cmd.py", line 559, in execute
481-
raise GitCommandNotFound(command, err)
482-
git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')
483-
cmdline: git clone -n --shared -v C:\\projects\\gitpython\\.git Users\\appveyor\\AppData\\Local\\Temp\\1\\tmplyp6kr_rnon_bare_test_root_module
484-
""", # noqa E501
479+
reason=(
480+
'"The process cannot access the file because it is being used by another process"'
481+
+ " on first call to rm.update"
482+
),
483+
raises=PermissionError,
485484
)
486485
@with_rw_repo(k_subm_current, bare=False)
487486
def test_root_module(self, rwrepo):
@@ -749,15 +748,13 @@ def test_list_only_valid_submodules(self, rwdir):
749748
repo = git.Repo(repo_path)
750749
assert len(repo.submodules) == 0
751750

752-
@skipIf(
751+
@pytest.mark.xfail(
753752
HIDE_WINDOWS_KNOWN_ERRORS,
754-
"""FIXME on cygwin: File "C:\\projects\\gitpython\\git\\cmd.py", line 671, in execute
755-
raise GitCommandError(command, status, stderr_value, stdout_value)
756-
GitCommandError: Cmd('git') failed due to: exit code(128)
757-
cmdline: git add 1__Xava verbXXten 1_test _myfile 1_test_other_file 1_XXava-----verbXXten
758-
stderr: 'fatal: pathspec '"1__çava verböten"' did not match any files'
759-
FIXME on appveyor: see https://ci.appveyor.com/project/Byron/gitpython/build/1.0.185
760-
""",
753+
reason=(
754+
'"The process cannot access the file because it is being used by another process"'
755+
+ " on first call to sm.move"
756+
),
757+
raises=PermissionError,
761758
)
762759
@with_rw_directory
763760
@_patch_git_config("protocol.file.allow", "always")
@@ -1039,7 +1036,7 @@ def test_branch_renames(self, rw_dir):
10391036
assert sm_mod.commit() == sm_pfb.commit, "Now head should have been reset"
10401037
assert sm_mod.head.ref.name == sm_pfb.name
10411038

1042-
@skipIf(not is_win, "Specifically for Windows.")
1039+
@skipUnless(is_win, "Specifically for Windows.")
10431040
def test_to_relative_path_with_super_at_root_drive(self):
10441041
class Repo(object):
10451042
working_tree_dir = "D:\\"
@@ -1050,9 +1047,9 @@ class Repo(object):
10501047
msg = '_to_relative_path should be "submodule_path" but was "%s"' % relative_path
10511048
assert relative_path == "submodule_path", msg
10521049

1053-
@skipIf(
1054-
True,
1055-
"for some unknown reason the assertion fails, even though it in fact is working in more common setup",
1050+
@pytest.mark.xfail(
1051+
reason="for some unknown reason the assertion fails, even though it in fact is working in more common setup",
1052+
raises=AssertionError,
10561053
)
10571054
@with_rw_directory
10581055
def test_depth(self, rwdir):

‎test/test_tree.py

-18
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,14 @@
55
# the BSD License: https://opensource.org/license/bsd-3-clause/
66

77
from io import BytesIO
8-
from unittest import skipIf
98

109
from git.objects import Tree, Blob
1110
from test.lib import TestBase
12-
from git.util import HIDE_WINDOWS_KNOWN_ERRORS
1311

1412
import os.path as osp
1513

1614

1715
class TestTree(TestBase):
18-
@skipIf(
19-
HIDE_WINDOWS_KNOWN_ERRORS,
20-
"""
21-
File "C:\\projects\\gitpython\\git\\cmd.py", line 559, in execute
22-
raise GitCommandNotFound(command, err)
23-
git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')
24-
cmdline: git cat-file --batch-check""",
25-
)
2616
def test_serializable(self):
2717
# tree at the given commit contains a submodule as well
2818
roottree = self.rorepo.tree("6c1faef799095f3990e9970bc2cb10aa0221cf9c")
@@ -51,14 +41,6 @@ def test_serializable(self):
5141
testtree._deserialize(stream)
5242
# END for each item in tree
5343

54-
@skipIf(
55-
HIDE_WINDOWS_KNOWN_ERRORS,
56-
"""
57-
File "C:\\projects\\gitpython\\git\\cmd.py", line 559, in execute
58-
raise GitCommandNotFound(command, err)
59-
git.exc.GitCommandNotFound: Cmd('git') not found due to: OSError('[WinError 6] The handle is invalid')
60-
cmdline: git cat-file --batch-check""",
61-
)
6244
def test_traverse(self):
6345
root = self.rorepo.tree("0.1.6")
6446
num_recursive = 0

‎test/test_util.py

+18-15
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@
99
import sys
1010
import tempfile
1111
import time
12-
from unittest import mock, skipIf
12+
from unittest import mock, skipUnless
1313
from datetime import datetime
1414

15-
import pytest
1615
import ddt
16+
import pytest
1717

1818
from git.cmd import dashify
1919
from git.compat import is_win
@@ -85,17 +85,26 @@ def setup(self):
8585
"array": [42],
8686
}
8787

88-
@skipIf(not is_win, "Paths specifically for Windows.")
88+
# FIXME: Mark only the /proc-prefixing cases xfail, somehow (or fix them).
89+
@pytest.mark.xfail(
90+
reason="Many return paths prefixed /proc/cygdrive instead.",
91+
raises=AssertionError,
92+
)
93+
@skipUnless(sys.platform == "cygwin", "Paths specifically for Cygwin.")
8994
@ddt.idata(_norm_cygpath_pairs + _unc_cygpath_pairs)
9095
def test_cygpath_ok(self, case):
9196
wpath, cpath = case
9297
cwpath = cygpath(wpath)
9398
self.assertEqual(cwpath, cpath, wpath)
9499

95-
@skipIf(not is_win, "Paths specifically for Windows.")
100+
@pytest.mark.xfail(
101+
reason=r'2nd example r".\bar" -> "bar" fails, returns "./bar"',
102+
raises=AssertionError,
103+
)
104+
@skipUnless(sys.platform == "cygwin", "Paths specifically for Cygwin.")
96105
@ddt.data(
97106
(r"./bar", "bar"),
98-
(r".\bar", "bar"),
107+
(r".\bar", "bar"), # FIXME: Mark only this one xfail, somehow (or fix it).
99108
(r"../bar", "../bar"),
100109
(r"..\bar", "../bar"),
101110
(r"../bar/.\foo/../chu", "../bar/chu"),
@@ -105,7 +114,7 @@ def test_cygpath_norm_ok(self, case):
105114
cwpath = cygpath(wpath)
106115
self.assertEqual(cwpath, cpath or wpath, wpath)
107116

108-
@skipIf(not is_win, "Paths specifically for Windows.")
117+
@skipUnless(sys.platform == "cygwin", "Paths specifically for Cygwin.")
109118
@ddt.data(
110119
r"C:",
111120
r"C:Relative",
@@ -118,7 +127,7 @@ def test_cygpath_invalids(self, wpath):
118127
cwpath = cygpath(wpath)
119128
self.assertEqual(cwpath, wpath.replace("\\", "/"), wpath)
120129

121-
@skipIf(not is_win, "Paths specifically for Windows.")
130+
@skipUnless(sys.platform == "cygwin", "Paths specifically for Cygwin.")
122131
@ddt.idata(_norm_cygpath_pairs)
123132
def test_decygpath(self, case):
124133
wpath, cpath = case
@@ -156,11 +165,6 @@ def test_lock_file(self):
156165
lock_file._obtain_lock_or_raise()
157166
lock_file._release_lock()
158167

159-
@pytest.mark.xfail(
160-
sys.platform == "cygwin",
161-
reason="Cygwin fails here for some reason, always",
162-
raises=AssertionError,
163-
)
164168
def test_blocking_lock_file(self):
165169
my_file = tempfile.mktemp()
166170
lock_file = BlockingLockFile(my_file)
@@ -173,9 +177,8 @@ def test_blocking_lock_file(self):
173177
self.assertRaises(IOError, wait_lock._obtain_lock)
174178
elapsed = time.time() - start
175179
extra_time = 0.02
176-
if is_win:
177-
# for Appveyor
178-
extra_time *= 6 # NOTE: Indeterministic failures here...
180+
if is_win or sys.platform == "cygwin":
181+
extra_time *= 6 # NOTE: Indeterministic failures without this...
179182
self.assertLess(elapsed, wait_time + extra_time)
180183

181184
def test_user_id(self):

0 commit comments

Comments
 (0)
Please sign in to comment.