The example on page 6 of the book shows this test code:
def test_failing():
assert (1, 2, 3) == (3, 2, 1)
and claims that the pytest output displays caret (^) diffs highlighting the differences.
This is incorrect because Pytest does not show caret diffs for tuple comparisons. Instead, it shows a structural diff using + and - to indicate which elements differ. Caret diffs are only produced when comparing strings with inline character differences.
This appears to be an editorial mistake in the book. The code example and the output shown do not match
If anyone disagrees do comment the correct application as this is the first time I’m using pytest.