-
Notifications
You must be signed in to change notification settings - Fork 111
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
Rewrite handler tests #299
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #299 +/- ##
==========================================
- Coverage 65.92% 64.86% -1.07%
==========================================
Files 51 51
Lines 5641 5465 -176
==========================================
- Hits 3719 3545 -174
+ Misses 1922 1920 -2
☔ View full report in Codecov by Sentry. |
rename single-letter vars
…rTest DriftErrorHandlerTest
…andlerTest PositiveEnergyHandlerTest
…est IncorrectSmearingHandlerFermiTest KspacingMetalHandlerTest LargeSigmaHandlerTest
Ran out of time. Only ones still missing are |
@janosh: Thank you for doing this valuable cleanup. I had thought about splitting these up into a greater number of individual tests and using pytests's |
40f345e
to
08cdcb8
Compare
The tests in
custodian/vasp/tests/test_handlers.py
are laden with order-dependent side effects. Running all tests in that file does not leave thetest_files/
unchanged. Large numbers of files are modified and added while tests run and again deleted at the end... but only if all tests pass. Failing tests leave behind dirty files in the repo that then cause subsequent test runs to fail that were previously passing.The right way to run IO-heavy tests like in Custodian is to move everything into temporary dirs that are auto-cleaned by the OS and can't affect anything inside the repo.