Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated tests to replace deprecated functions with assert_allclose an… #4979

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

0Shadow02
Copy link

@0Shadow02 0Shadow02 commented Mar 17, 2025

Pull Request Description

Fixes #3743

Changes Made for mdanalysis/testsuite/MDAnalysisTests/analysis/test_base.py:

  • Replaced deprecated assert_almost_equal with assert_allclose.
  • Utilized pytest.approx for single float comparisons.
  • Enhanced test coverage using pytest.mark.parametrize.
  • Verified error handling for ValueError and IndexError.

PR Checklist:

  • Issue raised/referenced?
  • Tests updated/added?
  • Documentation updated/added?
  • package/CHANGELOG file updated?
  • Is your name in package/AUTHORS?

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.

250317_17h31m41s_screenshot


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

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello there first time contributor! Welcome to the MDAnalysis community! We ask that all contributors abide by our Code of Conduct and that first time contributors introduce themselves on GitHub Discussions so we can get to know you. You can learn more about participating here. Please also add yourself to package/AUTHORS as part of this PR.

Copy link

codecov bot commented Mar 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.41%. Comparing base (dcaa087) to head (0a4c2dd).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #4979      +/-   ##
===========================================
- Coverage    93.42%   93.41%   -0.02%     
===========================================
  Files          177      189      +12     
  Lines        21859    22925    +1066     
  Branches      3078     3078              
===========================================
+ Hits         20422    21415     +993     
- Misses         986     1059      +73     
  Partials       451      451              

☔ View full report in Codecov by Sentry.
📢 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
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

modernize testing code
1 participant