We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
input:
import pytest def sut(): return [(1.0, 1.0)] def test_approx(): assert sut() == pytest.approx([(2.0, 2.0)])
output:
===================== test session starts ====================== platform darwin -- Python 3.12.6, pytest-8.3.3, pluggy-1.5.0 rootdir: /Users/thomas/projects/demo_assertion collected 1 item test_approx.py F [100%] =========================== FAILURES =========================== _________________________ test_approx __________________________ def test_approx(): > assert sut() == pytest.approx([(2.0, 2.0)]) E AssertionError: assert [(1.0, 1.0)] == approx([(2.0, 2.0)]) E E (pytest_assertion plugin: representation of details failed: /Users/thomas/.virtualenvs/demo_assertion/lib/python3.12/site-packages/_pytest/python_api.py:343: AttributeError: 'tuple' object has no attribute 'expected'. E Probably an object has a faulty __repr__.) test_approx.py:9: AssertionError =================== short test summary info ==================== FAILED test_approx.py::test_approx - AssertionError: assert [(1.0, 1.0)] == approx([(2.0, 2.0)]) ====================== 1 failed in 0.01s =======================
pip list:
Package Version --------- ------- iniconfig 2.0.0 packaging 24.1 pip 24.2 pluggy 1.5.0 pytest 8.3.3
uname -a: Darwin Thomass-MacBook-Pro.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8122 arm64
pip list
The text was updated successfully, but these errors were encountered:
We should raise a type error, this swim style usage is not intended
Sorry, something went wrong.
No branches or pull requests
input:
output:
pip list:
uname -a: Darwin Thomass-MacBook-Pro.local 23.6.0 Darwin Kernel Version 23.6.0: Mon Jul 29 21:14:04 PDT 2024; root:xnu-10063.141.2~1/RELEASE_ARM64_T8122 arm64
pip list
from the virtual environment you are usingThe text was updated successfully, but these errors were encountered: