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!"
posted @ 2022-05-08 12:30  lms21  阅读(18)  评论(0)    收藏  举报