Rule that suggests explicit strict=
in @pytest.mark.xfail
#267
Labels
enhancement
New feature or request
strict=
in @pytest.mark.xfail
#267
Rule request
Description
Detect use of the
@pytest.mark.xfail
decorator and ensure it explicitly sets astrict=True
orstrict=False
rather than allowing silent (and possibly accidental) use of the defaultFalse
configuration.Rationale
The
pytest.mark.xfail
decorator has astrict
parameter that defaults toFalse
, makingxfail
in CI roughly equivalent to askip
rather than failing if the test passes. This would prevent accidentally committingxfail
tests that get hidden in CI.The text was updated successfully, but these errors were encountered: