-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
Bug: repeated dict keys in formatting testing results in some keys going untested. #162
Comments
See PR: #167 I made a PR to convert the dict of dicts of test cases into a list of tuples of test cases and expected results. After making this change some test cases were "uncovered". Some of these failed at an initial test. I went through and modified the unit tests until they all pass. Most or all of the test cases that were failing look like oversights in the construction of the unit tests but I'm not sure. Here's a summary of the changes needed to pass:
I can't tell if my updated expected values are in line with what is actually expected according to the documentation within the package documentation and within the code. I think most of the cases are benign just having to do with what default settings are for things like precision or the presence of parentheses when nothing is specified. Lines 1598 and 1640 are the most alarming to me since the first one had a big change from what was originally expected and the 1640 line has to do with a thorny edge case about decimals after integers. |
See for example
https://github.com/lebigot/uncertainties/blob/804adccf3401aeacbcbae0d669f92131fcd02c03/uncertainties/test_uncertainties.py#L1596-L1607
These are two ufloat value entries in test_format. Since the two dict entries have the same keys the latter overwrites the former and the cases in the former do not get tested.
Immediate solutions I see:
Not the most elegant probably but would at least fix this issue.
There are likely other possibilities.
The text was updated successfully, but these errors were encountered: