mdanalysis icon indicating copy to clipboard operation
mdanalysis copied to clipboard

Fixes #3743: Modernize test assertions in test_msd.py

Open tanii1125 opened this issue 2 weeks ago • 1 comments

Summary of Changes-

This PR Modernize test assertions in testsuite\MDAnalysisTests\analysis\test_msd.py

Changes made-

  1. Replaced deprecated assert_almost_equal with assert_allclose using tolerances equivalent to the previous decimal keyword.
  2. Replaced scalar floating-point comparisons with pytest.approx() where appropriate.
  3. Cleaned up imports (removed unused deprecated functions).
  4. Ensured all updated assertions preserve original test behavior.

Thanks, and please let me know if any further adjustments are needed.


📚 Documentation preview 📚: https://mdanalysis--5171.org.readthedocs.build/en/5171/

tanii1125 avatar Dec 08 '25 16:12 tanii1125

Codecov Report

:white_check_mark: All modified and coverable lines are covered by tests. :white_check_mark: Project coverage is 86.14%. Comparing base (bbcef1b) to head (4ad7959).

:exclamation: There is a different number of reports uploaded between BASE (bbcef1b) and HEAD (4ad7959). Click for more details.

HEAD has 3 uploads less than BASE
Flag BASE (bbcef1b) HEAD (4ad7959)
5 2
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     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Dec 08 '25 16:12 codecov[bot]