-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Ensure ignored tests are picked up by tox #2758
Conversation
Tox has not been running range_test.py due to the file being executable. This commit sets the file permissions to read/write only and remediates the problems that arose when the tests ran again: * Some tests for RangeMonthly were not accurately capturing the correct logic * Some tests were not compatible with Python 3 in some map operations * RangeByMinutesBase performed arithmetics that yield different results on Python 2 and 3, this was changed to be more resilient on both. May have impact on those relying on the erroneous behavior right now.
Tox has not been running contrib/sge_test.py due to the file being executable. This commit sets the file permissions to read/write only and remediates the problems that arose when the tests ran again: * pickle.dump() behaves differently in Python 2 and 3, ensure that it works for both * Get rid of warnings about unclosed files, handling file lifecycles properly * Minor docstring syntax
Seems like the codecov/patch step fails because I changed some file handling operations. I noticed the way files were handled wasn't safe (they were opened but not closed) so I added functionality for closing them while I was making the tests work in the same code parts. Now codecov is complaining I didn't add a test for it. Is this vital to fix? Or is the problem due to something else? |
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.
This looks fine to me.
Don't worry about that top codecov test
Thank you @dlstadther. How do I get it merged? |
* Enable erroneously skipped range tests Tox has not been running range_test.py due to the file being executable. This commit sets the file permissions to read/write only and remediates the problems that arose when the tests ran again: * Some tests for RangeMonthly were not accurately capturing the correct logic * Some tests were not compatible with Python 3 in some map operations * RangeByMinutesBase performed arithmetics that yield different results on Python 2 and 3, this was changed to be more resilient on both. May have impact on those relying on the erroneous behavior right now. * Enable erroneously skipped SGE tests Tox has not been running contrib/sge_test.py due to the file being executable. This commit sets the file permissions to read/write only and remediates the problems that arose when the tests ran again: * pickle.dump() behaves differently in Python 2 and 3, ensure that it works for both * Get rid of warnings about unclosed files, handling file lifecycles properly * Minor docstring syntax
* Enable erroneously skipped range tests Tox has not been running range_test.py due to the file being executable. This commit sets the file permissions to read/write only and remediates the problems that arose when the tests ran again: * Some tests for RangeMonthly were not accurately capturing the correct logic * Some tests were not compatible with Python 3 in some map operations * RangeByMinutesBase performed arithmetics that yield different results on Python 2 and 3, this was changed to be more resilient on both. May have impact on those relying on the erroneous behavior right now. * Enable erroneously skipped SGE tests Tox has not been running contrib/sge_test.py due to the file being executable. This commit sets the file permissions to read/write only and remediates the problems that arose when the tests ran again: * pickle.dump() behaves differently in Python 2 and 3, ensure that it works for both * Get rid of warnings about unclosed files, handling file lifecycles properly * Minor docstring syntax
This fixes #2757, see full description of motivation there.
The change modifies file permissions on
range_test.py
andsge_test.py
from 755 to 644 so that they are actually picked up by tox. This revealed a bunch of failing tests that I also fixed. In some cases because the tests were wrong, in other cases because of actual problems in the luigi functionality. The commit messages contain detailed explanations of the changes.The change has been tested by running the concerned files manually with
python -m unittest <module>
, and also by running the full tox test suite on my machine, verifying that 1) the tests are picked up, 2) they go through, 3) no other tests are impacted.Would like @lallea to review the parts concerning MonthInstantiationTest.