Skip to content

Commit a3e488d

Browse files
authored
An attempt to fix mypyc tests on MacOS (#16520)
Fixes #16420 Although this is not 100% clear yet, but after 20 runs on a Mac I have it no longer fails (without this patch it failed 20% of times). Btw, contrary to the comment, _my_ Linux Mint (which is an Ubuntu derivative) works perfectly (i.e. test passed 20 times even after I removed the `sleep()`). So it is not really Mac vs Linux issue.
1 parent 706389d commit a3e488d

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

mypyc/test/test_run.py

+2-4
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,10 @@ def run_case_inner(self, testcase: DataDrivenTestCase) -> None:
172172
# new by distutils, shift the mtime of all of the
173173
# generated artifacts back by a second.
174174
fudge_dir_mtimes(WORKDIR, -1)
175-
# On Ubuntu, changing the mtime doesn't work reliably. As
175+
# On some OS, changing the mtime doesn't work reliably. As
176176
# a workaround, sleep.
177-
#
178177
# TODO: Figure out a better approach, since this slows down tests.
179-
if sys.platform == "linux":
180-
time.sleep(1.0)
178+
time.sleep(1.0)
181179

182180
step += 1
183181
with chdir_manager(".."):

0 commit comments

Comments
 (0)