rename x to dz in mud_calculator.py and decrease error tolerance for tests#147
rename x to dz in mud_calculator.py and decrease error tolerance for tests#147sbillinge merged 2 commits intodiffpy:mainfrom
mud_calculator.py and decrease error tolerance for tests#147Conversation
| expected_mud = 3 | ||
| actual_mud = compute_mud(file) | ||
| assert actual_mud == pytest.approx(expected_mud, rel=0.01, abs=0.1) | ||
| assert actual_mud == pytest.approx(expected_mud, rel=1e-4, abs=1e-3) |
There was a problem hiding this comment.
decrease the error tolerance. I think previously I changed this to 0.01 and 0.1 because I thought about the edge cases like HfO2 wire data. But for the other better data (pretty much all other real data we ran) the error is much lower. So we can have a smaller tolerance here.
There was a problem hiding this comment.
This is a test, not code, so the logic is that we set the tolerance we want for the test, not some worst case scenario I think, right?
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #147 +/- ##
=======================================
Coverage 99.31% 99.31%
=======================================
Files 6 6
Lines 293 293
=======================================
Hits 291 291
Misses 2 2
|
mud_calculator.py and decrease error range for testsmud_calculator.py and decrease error tolerance for tests
Yes, great title! Thanks |
addressed comments in #146
@sbillinge ready for review
@bobleesj let me know if this title is more informative!