def test_module_level_skip_with_allow_module_level(pytester: Pytester) -> None:
    """Verify that using pytest.skip(allow_module_level=True) is allowed."""
    pytester.makepyfile(
        """
        import pytest
        pytest.skip("skip_module_level", allow_module_level=True)

        def test_func():
            assert 0
    """
    )
    result = pytester.runpytest("-rxs")
    result.stdout.fnmatch_lines(["*SKIP*skip_module_level"])
Verify that using pytest.skip(allow_module_level=True) is allowed.
testing/test_skipping.py