expected failure

A test marked with @pytest.mark.xfail because it is known to fail today, reported as xfailed instead of failed.

In more detail

It records a known bug in the suite rather than deleting the test. If the test starts passing, pytest reports it as xpassed, and with strict=True that counts as a failure so you notice the fix.

Related terms

Taught in

References