-
Notifications
You must be signed in to change notification settings - Fork 85
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
fix: Use function scope to avoid altering hypotest_args fixture #2011
Conversation
Codecov ReportBase: 98.28% // Head: 97.99% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #2011 +/- ##
==========================================
- Coverage 98.28% 97.99% -0.30%
==========================================
Files 68 68
Lines 4482 4482
Branches 730 730
==========================================
- Hits 4405 4392 -13
- Misses 45 55 +10
- Partials 32 35 +3
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
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 change the fixture scope to function instead and you don't need the deepcopy. This should remove the need for deepcopy
.
* Use copy.deepcopy to create a copy of the pyhf.simplemodels.uncorrelated_background object from the hypotest_args fixture. Fixing the POI in the model config changes it for the entire fixture otherwise, which would cause errors in other tests that later use it and defeats the point of the fixture. * Remove unnecessary use of tmpdir fixture as no output is written.
6cdcc93
to
df1fb4d
Compare
The coverage failure/change here is rather suspicious / odd as none of the changes should impact coverage. |
Yeah I think Codecov is having issues. :/ |
Description
Needed for PR #1274
Checklist Before Requesting Reviewer
Before Merging
For the PR Assignees: