Skip to content

tests: modernize deprecated numpy assertions in test_helix_analysis.p…#5408

Open
AnimeshPriyanshu wants to merge 2 commits into
MDAnalysis:developfrom
AnimeshPriyanshu:modernize-tests-3743
Open

tests: modernize deprecated numpy assertions in test_helix_analysis.p…#5408
AnimeshPriyanshu wants to merge 2 commits into
MDAnalysis:developfrom
AnimeshPriyanshu:modernize-tests-3743

Conversation

@AnimeshPriyanshu

Copy link
Copy Markdown

Fixes #3743

Changes made in this Pull Request

  • Replaced deprecated assert_almost_equal() assertions with assert_allclose() in testsuite/MDAnalysisTests/analysis/test_helix_analysis.py.
  • Replaced scalar floating-point comparison with pytest.approx() where appropriate.
  • Removed the deprecated assert_almost_equal import.
  • Added my name to package/AUTHORS.

LLM / AI generated code disclosure

LLMs or other AI-powered tools (beyond simple IDE use cases) were used in this contribution: yes

PR Checklist

  • Issue raised/referenced?
  • Tests updated/added?
  • Documentation updated/added?
  • package/CHANGELOG file updated?
  • Is your name in package/AUTHORS? (If it is not, add it!)
  • LLM/AI disclosure was updated.

Testing

Ran:

python -m pytest testsuite/MDAnalysisTests/analysis/test_helix_analysis.py

Result:

46 passed

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.
Screenshot 2026-06-22 at 6 57 43 PM

@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 (d25f074) to head (e618fd9).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #5408      +/-   ##
===========================================
+ Coverage    93.63%   93.85%   +0.21%     
===========================================
  Files          182      182              
  Lines        22509    22509              
  Branches      3202     3202              
===========================================
+ Hits         21076    21125      +49     
+ Misses         965      922      -43     
+ Partials       468      462       -6     

☔ 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.

modernize testing code

2 participants