You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve approx repr for better readability (#12665)
Adjust `ApproxScalar.__repr__` to format tolerances in decimal form for smaller ranges.
Closes#6985
---------
Co-authored-by: Bruno Oliveira <[email protected]>
Co-authored-by: Pierre Sassoulas <[email protected]>
Improved :func:`pytest.approx` to enhance the readability of value ranges and tolerances between 0.001 and 1000.
2
+
* The `repr` method now provides clearer output for values within those ranges, making it easier to interpret the results.
3
+
* Previously, the output for those ranges of values and tolerances was displayed in scientific notation (e.g., `42 ± 1.0e+00`). The updated method now presents the tolerance as a decimal for better readability (e.g., `42 ± 1`).
0 commit comments