Comparing approx instances inside lists should not produce an error in the detailed diff. Integration test for issue #2111.
(self, pytester: Pytester)
| 745 | mocked_doctest_runner.run(test) |
| 746 | |
| 747 | def test_unicode_plus_minus(self, pytester: Pytester) -> None: |
| 748 | """ |
| 749 | Comparing approx instances inside lists should not produce an error in the detailed diff. |
| 750 | Integration test for issue #2111. |
| 751 | """ |
| 752 | pytester.makepyfile( |
| 753 | """ |
| 754 | import pytest |
| 755 | def test_foo(): |
| 756 | assert [3] == [pytest.approx(4)] |
| 757 | """ |
| 758 | ) |
| 759 | expected = "4.0e-06" |
| 760 | result = pytester.runpytest() |
| 761 | result.stdout.fnmatch_lines( |
| 762 | [f"*At index 0 diff: 3 != 4 ± {expected}", "=* 1 failed in *="] |
| 763 | ) |
| 764 | |
| 765 | @pytest.mark.parametrize( |
| 766 | "x, name", |
nothing calls this directly
no test coverage detected