def test_module_level_skip_error(testdir):
 testdir.makepyfile('\n        import pytest\n        @pytest.skip\n        def test_func():\n            assert True\n    ')
 result = testdir.runpytest()
 result.stdout.fnmatch_lines('*Using pytest.skip outside of a test is not allowed*')

def test_module_level_skip_error ( testdir ) : testdir . makepyfile ( '\n        import pytest\n        @pytest.skip\n        def test_func():\n            assert True\n    ' ) result = testdir . runpytest ( ) result . stdout . fnmatch_lines ( '*Using pytest.skip outside of a test is not allowed*' )
verify that using pytest .