Disable skipping pytest tests without an explanation.
Apply with the Grit CLI
grit apply no_skipped_tests
Forbidden
BEFORE
@pytest.mark.skip() def test_the_unknown(): pass
AFTER
def test_the_unknown(): pass
Reason explanation
If you include a reason explaining why the test is skipped, it will be allowed.
PY
@pytest.mark.skip(reason="no way of currently testing this") def test_the_unknown(): pass
Other decorators
Any other decorators are still preserved.
BEFORE
@pytest.mark.skip() @pytest.mark.xfail(reason="This test is expected to fail") def test_the_unknown(): pass
AFTER
@pytest.mark.xfail(reason="This test is expected to fail") def test_the_unknown(): pass
Ordering doesn't matter
BEFORE
@pytest.mark.xfail(reason="This test is expected to fail") @pytest.mark.skip() def test_the_unknown(): pass
AFTER
@pytest.mark.xfail(reason="This test is expected to fail") def test_the_unknown(): pass