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 Raises misleading error for Sequences/Collections containing different strings · Issue #13010 · pytest-dev/pytest Closed Labels topic: approxrelated to pytest.approx function DescriptionHi folks, I was using def test_approx_str(): assert [1.0, 2.0, "abc"] == approx([1.0, 2.0, "aaa"]) I was expecting pytest to bypass the approx for def test_approx_str(): > assert [1.0, 2.0, "abc"] == approx([1.0, 2.0, "aaa"]) E AssertionError: assert [1.0, 2.0, 'abc'] == approx([1.0 ±...2.0e-06, aaa]) E E (pytest_assertion plugin: representation of details failed: /tmp/test_a/.venv/lib/python3.12/site-packages/_pytest/python_api.py:343: TypeError: unsupported operand type(s) for -: 'str' and 'str'. E Probably an object has a faulty __repr__.) test_foo.py:5: AssertionError let me know if you need more info about this Package Version
--------- -------
iniconfig 2.0.0
packaging 24.2
pluggy 1.5.0
pytest 8.3.3
Activity
MetadataMetadataAssigneesLabelstopic: approxrelated to pytest.approx function TypeProjectsMilestoneRelationshipsDevelopmentIssue 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. |