-
Notifications
You must be signed in to change notification settings - Fork 21
Fix all remaining divide by zero pytest warnings #262
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
Conversation
), | ||
] | ||
|
||
|
||
@pytest.mark.parametrize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just moving them under @pytest.mark.parametrize
- no numbers have been modified.
|
||
|
||
@pytest.mark.parametrize("init_args, expected_error_msg", test_init_invalid_params) | ||
@pytest.mark.parametrize( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will further refine these comments with higher level commets, etc. in the following PRs (issues have been created for these)
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #262 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 8 8
Lines 391 404 +13
=========================================
+ Hits 391 404 +13
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbillinge ready for review - no numbers have been modified.
def test_d_to_tth(wavelength, d, expected_tth, wavelength_warning_msg): | ||
if wavelength is None: | ||
def test_d_to_tth(wavelength, d, expected_tth, divide_by_zero_warning_expected, wavelength_warning_msg): | ||
if wavelength is None and not divide_by_zero_warning_expected: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am thinking we could make a reusable test util function under conftest.py
- that takes in d_to_tth
, tth_to_d
, etc and capture these warning messages.
Closes #223
This PR focused on catching warnings. In the following PRs, I will focus on checking test comments and refactoring into reusable components with
conftest.py