-
Notifications
You must be signed in to change notification settings - Fork 50
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
Closes #1163 Running Tests on OSX/Windows #1164
Conversation
|
||
# Windows and OSX use spawn instead of fork by default | ||
# which causes the config server to fail to start | ||
if platform == "darwin" or platform == "win32": |
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 think you could make the argument that this belongs in the config server code in panoptes-utils instead. @wtgee let me know if you'd rather see it over there.
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.
Thanks @programatt, I just approved your first-time contribution so the tests are running now.
Can you add windows and mac to the matrix.os
in .github/workflows/pythontest.yaml
as part of this PR?
Codecov Report
@@ Coverage Diff @@
## develop #1164 +/- ##
===========================================
- Coverage 83.08% 78.32% -4.77%
===========================================
Files 86 89 +3
Lines 7425 7634 +209
Branches 635 717 +82
===========================================
- Hits 6169 5979 -190
- Misses 1083 1492 +409
+ Partials 173 163 -10
Continue to review full report at Codecov.
|
Co-authored-by: Wilfred Tyler Gee <wtylergee@gmail.com>
@wtgee anything else needed? |
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.
LGTM, although the macos tests are failing on install. Looks like they are using python 2.7 by default? Which is odd. Must be how the interpreter needs to be specified or something.
strategy: | ||
matrix: | ||
python-version: [ "3.10" ] | ||
python-version: [ "3.10" ] |
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.
Editor not trimming whitespace?
|
||
|
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.
Were these editor added or intentional?
@wtgee looks like the mac tests are now failing with this error
Have you seen that before? I'm guessing theres a library that needs to be added to the mac gh action image. |
Better late than never? Fixed this upstream at panoptes/panoptes-utils#304 |
Update documentation for instructions on how to run tests locally on OSX. Fix conftest.py to not error when running pytest on OSX and Windows.
Description
When attempting to run pytest on my macbook, I ran into an issue on startup where the config_server throws a strange error.
Doing some searching it looks like python 3.8 on OSX changed to use spawn instead of fork for processes by default. See pytest-dev/pytest-flask#104 (comment)
So I modified conftest to detect the OS and change the behavior on windows and osx and the pytest command runs as expected.
Related Issue
#1163
How Has This Been Tested?
The changes allowed pytest to run successfully on a mac
Screenshots (if appropriate):
n/a
Types of changes
Checklist: