Fixes #3743: Modernize test assertions in test_msd.py#5171
Fixes #3743: Modernize test assertions in test_msd.py#5171tani-dubey 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 #5171 +/- ##
===========================================
- Coverage 92.72% 86.14% -6.59%
===========================================
Files 180 180
Lines 22472 22472
Branches 3188 3188
===========================================
- Hits 20837 19358 -1479
- Misses 1177 2660 +1483
+ Partials 458 454 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I’m seeing 11 test failures after modernizing the assertions here, and I’m not fully sure what I’m missing. I expected this to be a mechanical change, but it seems to affect behavior in some cases. I’ve looked through the failures and tried to trace the differences, but I may be misunderstanding something. I’d really appreciate any pointers on what I should look at or whether this approach is flawed. Happy to revise or drop this if needed. |
Summary of Changes-
This PR Modernize test assertions in testsuite\MDAnalysisTests\analysis\test_msd.py -- Issue #3743
Changes made-
assert_almost_equalwithassert_allcloseusing tolerances equivalent to the previous decimal keyword.pytest.approx()where appropriate.Thanks, and please let me know if any further adjustments are needed.
📚 Documentation preview 📚: https://mdanalysis--5171.org.readthedocs.build/en/5171/