pytest-mark跳过
import pytest
import sys
environment='android'
@pytest.mark.skipif(environment=="android",reason='android平台没有这个功能,只有ios下有')
def test_add():
print("apple")
def test_add2():
print("android")
@pytest.mark.skipif(sys.platform=='win32',reason='不在win下运行')
@pytest.mark.skipif(sys.version_info<(3,6),reason='3.6以下不执行')
def test_add3():
print("windows")