其他分享
首页 > 其他分享> > pytest 测试用例断言

pytest 测试用例断言

作者:互联网

 

 实例:

def test_answer():

assert inc(4) == 5,"error"

def test_str():
assert "abc" in "abcdd"
def test_sys():
assert 'linux' in sys.platform,"no linux!"

标签:sys,abc,断言,pytest,assert,测试用例,linux,test,def
来源: https://www.cnblogs.com/manshuoli/p/16245288.html