Drop/Replace lock file test in test_xdr#5237
Drop/Replace lock file test in test_xdr#5237jeremyleung521 wants to merge 8 commits intoMDAnalysis:developfrom
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #5237 +/- ##
===========================================
- Coverage 93.83% 93.82% -0.01%
===========================================
Files 180 180
Lines 22475 22473 -2
Branches 3190 3189 -1
===========================================
- Hits 21090 21086 -4
- Misses 923 924 +1
- Partials 462 463 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Seems like it's an active place of contention/change... so maybe it's worth waiting... or just pin to |
|
Adding a data point: The newly released |
Seems like the fix filelock implemented for the issue I referenced earlier was a more robust loop for acquiring locks. So the behavior now is: explicitly delete lock file after release for UNIX and leave lock file orphaned after release for windows. This is the exact opposite behavior from |
Fixes #5236
To be honest, the test (
test_offset_lock_created) does not make sense to me since it was testing if we ever locked a file before and not actual current behavior of locking a file (and was apparently never tested in windows due to filelock's behavioral differences across OSes).Now that UNIX behavior is same as Windows (orphaned lock file automatically deleted after unlock), it seems ok to remove the test.First commit removes the test. Second commit implements a replacement test where "open/acquire a lock --> check --> release it --> check it's gone."
I ran flake8 on the file and there were some unused imports which I removed.
(EDIT: The striked-out part apparently is no longer true from a commit five days ago... what a mess)
Changes made in this Pull Request:
test_offset_lock_created) that involves checking for a lock file after the file lock had been releasedLLM / AI generated code disclosure
LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: no
PR Checklist
package/CHANGELOGfile updated?package/AUTHORS? (If it is not, add it!)Developers Certificate of Origin
I certify that I can submit this code contribution as described in the Developer Certificate of Origin, under the MDAnalysis LICENSE.
📚 Documentation preview 📚: https://mdanalysis--5237.org.readthedocs.build/en/5237/