-
Notifications
You must be signed in to change notification settings - Fork 40
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
Change to enable running two unit tests on MacOS #210
Conversation
tests/test_lib.py
Outdated
@@ -904,7 +872,7 @@ def run_interactive_interrupt(interactive): | |||
p = multiprocessing.Process( | |||
target=_long_running_successful_problem, args=(interactive,)) | |||
p.start() | |||
time.sleep(.1) | |||
time.sleep(1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See line 858, you might bump the _long_running_successful_problem
to time out after 2s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made that change locally and tested just now on both Mac and Linux, and the tests still pass.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added that to the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this is a ridiculously complex test. Line 893:
if time.perf_counter() - t0 > .5:
# be a little generous here... but the caller should kill this in way less than .5s
sys.exit(1)
I guess we should bump that to 1.5?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, this is a ridiculously complex test.
😆 It sure is!
I guess we should bump that to 1.5?
Tested that locally and it is safe seems safe and prudent. Will do.
In my testing on MacOS, the "test_interactive_interrupt" test passed without any changes needed, and the "test_headless_interrupt" test only needed to have this sleep time increased to pass.
The previous commit caused a unit test to fail on Linux. This change fixes that.
This PR makes a small change to a sleep time in one function that is used by two unit tests. That change enables one unit test to pass that was otherwise failing on MacOS. Changing the sleep time does not compromise the integrity of the test, I believe. With all tests now passing on MacOS, the code to skip two tests is not needed, so that code is removed.