Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0eb38bc

Browse files
committed
Fix test_blocking_lock_file for cygwin
This permits the longer delay in test_blocking_lock_file--which wasalready allowed for native Windows--on Cygwin, where it is alsoneeded. That lets the xfail mark for Cygwin be removed.This also updates the comments to avoid implying that the need forthe delay is AppVeyor-specific (it seems needed on CI and locally).
1 parent9c7ff1e commit0eb38bc

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

‎test/test_util.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
fromunittestimportmock,skipIf
1313
fromdatetimeimportdatetime
1414

15-
importpytest
1615
importddt
1716

1817
fromgit.cmdimportdashify
@@ -156,11 +155,6 @@ def test_lock_file(self):
156155
lock_file._obtain_lock_or_raise()
157156
lock_file._release_lock()
158157

159-
@pytest.mark.xfail(
160-
sys.platform=="cygwin",
161-
reason="Cygwin fails here for some reason, always",
162-
raises=AssertionError,
163-
)
164158
deftest_blocking_lock_file(self):
165159
my_file=tempfile.mktemp()
166160
lock_file=BlockingLockFile(my_file)
@@ -173,9 +167,8 @@ def test_blocking_lock_file(self):
173167
self.assertRaises(IOError,wait_lock._obtain_lock)
174168
elapsed=time.time()-start
175169
extra_time=0.02
176-
ifis_win:
177-
# for Appveyor
178-
extra_time*=6# NOTE: Indeterministic failures here...
170+
ifis_winorsys.platform=="cygwin":
171+
extra_time*=6# NOTE: Indeterministic failures without this...
179172
self.assertLess(elapsed,wait_time+extra_time)
180173

181174
deftest_user_id(self):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp