Sometimes we may want to skip some tests because either 1) the functionality they test is not supported yet Or 2) some versions of the library didn’t support it. We can use one of the following three pytest markers for this purpose:
pytest.mark.skip: Skip the test completelypytest.mark.skipif(condition, ...): Skip the test if the condition isTruepytest.mark.xfail(..., strict=False): Run the test even though we know it would fail. Thestrictoption determines if the passed test is classified asXPASSEDifstrict=FalseORFAILEDifstrict=True. If the test failed, it would always returnXFAILregardless of thestrictoption.