Просто пропустить тест:
@pytest.mark.skip(reason="no way of currently testing this")
def test_the_unknown():
...
либо:
def test_function():
if not valid_config():
pytest.skip("unsupported configuration")