Skip to content

test: fix pytest warnings being raised - #228

Open
cadenmyers13 wants to merge 2 commits into
diffpy:mainfrom
cadenmyers13:fix-warnings
Open

cadenmyers13 wants to merge 2 commits into
diffpy:mainfrom
cadenmyers13:fix-warnings

Conversation

@cadenmyers13

Copy link
Copy Markdown
Contributor

Three different warnings were being raised when running pytest:

  1. A deprecated diffpy.structure function needed to be changed
  2. RuntimeWarnings were being raised in characteristic function testing. This should be raised because the test gives non-physical inputs. Now we capture those warnings
  3. A divide by zero warning from creating a new, unused variable and calculating uncertainties from it.

@cadenmyers13

Copy link
Copy Markdown
Contributor Author

@sbillinge ready for review

@codecov

codecov Bot commented Oct 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.14%. Comparing base (a9eae82) to head (300e0b5).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #228       +/-   ##
===========================================
+ Coverage   71.63%   85.14%   +13.51%     
===========================================
  Files          25       43       +18     
  Lines        3437     4753     +1316     
===========================================
+ Hits         2462     4047     +1585     
+ Misses        975      706      -269     
Files with missing lines Coverage Δ
tests/test_characteristicfunctions.py 54.40% <100.00%> (+42.14%) ⬆️
tests/test_diffpyparset.py 98.79% <100.00%> (ø)
tests/test_fitrecipe.py 100.00% <100.00%> (+0.23%) ⬆️

... and 19 files with indirect coverage changes

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

This branch has not been deployed

No deployments
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.

1 participant