Under https://docs.pytest.org/en/latest/skipping.html#skipping-test-functions there's a snippet that demonstrates skipping at the module level.
import pytest
if not pytest.config.getoption("--custom-flag"):
pytest.skip("--custom-flag is missing, skipping tests", allow_module_level=True)
It seems like pytest.config no longer exists or isn't accessible in this way. This doc should be updated to reflect the current way this would be achieved, or removed if it's not possible. I'm using pytest 3.9.1 but this may have changed in an earlier version.
Under https://docs.pytest.org/en/latest/skipping.html#skipping-test-functions there's a snippet that demonstrates skipping at the module level.
It seems like
pytest.configno longer exists or isn't accessible in this way. This doc should be updated to reflect the current way this would be achieved, or removed if it's not possible. I'm using pytest 3.9.1 but this may have changed in an earlier version.