Skip to content

tests: modernize assertions in test_persistencelength (ref #3743)#5407

Open
palak22291 wants to merge 2 commits into
MDAnalysis:developfrom
palak22291:modernize-persistencelength-3743
Open

tests: modernize assertions in test_persistencelength (ref #3743)#5407
palak22291 wants to merge 2 commits into
MDAnalysis:developfrom
palak22291:modernize-persistencelength-3743

Conversation

@palak22291

Copy link
Copy Markdown

Summary

This PR modernizes deprecated NumPy testing assertions in testsuite/MDAnalysisTests/analysis/test_persistencelength.py as part of issue #3743.

Changes

  • Replaced scalar uses of assert_almost_equal() with pytest.approx()
  • Removed the deprecated assert_almost_equal import

Verification

  • Ran:

    pytest testsuite/MDAnalysisTests/analysis/test_persistencelength.py

  • Result: all 30 tests passed successfully.

@codecov

codecov Bot commented Jun 22, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.85%. Comparing base (941d679) to head (476dd6e).
⚠️ Report is 7 commits behind head on develop.

Additional details and impacted files
@@           Coverage Diff            @@
##           develop    #5407   +/-   ##
========================================
  Coverage    93.85%   93.85%           
========================================
  Files          182      182           
  Lines        22509    22509           
  Branches      3202     3202           
========================================
  Hits         21125    21125           
  Misses         922      922           
  Partials       462      462           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants