GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — pytest approx wrong formatting return - printing all values as wrong. · Issue #12444 · pytest-dev/pytest Closed Labels DescriptionHey! Thanks for this great library! pytest == 8.2.0 def test_approx_dict_equal(): # This tests passes! assert {'a': 1, 'c': 3} == pytest.approx({'a': 1, 'c': 3}) def test_approx_dict_ordered(): # This tests fails as expected and return CORRECT output assert {'a': 1, 'c': 5} == pytest.approx({'a': 1, 'c': 3}) def test_approx_dict_unordered(): # This tests fails as expected and return WRONG output assert {'c': 5, 'a': 1} == pytest.approx({'a': 1, 'c': 3}) and the output I get from the two failing tests is: ================================================= short test summary info ================================================== FAILED tests/test_debug_pytest.py::test_approx_dict_ordered - AssertionError: assert {'a': 1, 'c': 5} == approx({'a': 1 ± 1.0e-06, 'c': 3 ± 3.0e-06}) comparison failed. Mismatched elements: 1 / 2: Max absolute difference: 2 Max relative difference: 0.6666666666666666 Index | Obtained | Expected c | 5 | 3 ± 3.0e-06 FAILED tests/test_debug_pytest.py::test_approx_dict_unordered - AssertionError: assert {'c': 5, 'a': 1} == approx({'a': 1 ± 1.0e-06, 'c': 3 ± 3.0e-06}) comparison failed. Mismatched elements: 2 / 2: Max absolute difference: 4 Max relative difference: 4.0 Index | Obtained | Expected a | 1 | 1 ± 1.0e-06 c | 5 | 3 ± 3.0e-06 ======================================== 2 failed, 1 passed, 4 deselected in 0.37s ========================================= Activity
MetadataMetadataAssigneesLabelsTypeProjectsMilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |