Skip to content
Merged
Changes from all commits
Commits
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
6 changes: 2 additions & 4 deletions mypyc/test/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,10 @@ def run_case_inner(self, testcase: DataDrivenTestCase) -> None:
# new by distutils, shift the mtime of all of the
# generated artifacts back by a second.
fudge_dir_mtimes(WORKDIR, -1)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're just doing time.sleep() on all platforms now, maybe we should just delete this line (and adjust the comment above it)? Or comment it out?

Suggested change
fudge_dir_mtimes(WORKDIR, -1)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no harm in doing both. I would just keep it as is, and hope someone will find a better solution soon.

# On Ubuntu, changing the mtime doesn't work reliably. As
# On some OS, changing the mtime doesn't work reliably. As
# a workaround, sleep.
#
# TODO: Figure out a better approach, since this slows down tests.
if sys.platform == "linux":
time.sleep(1.0)
time.sleep(1.0)

step += 1
with chdir_manager(".."):
Expand Down