zengxuejie

导航

2020年10月13日 #

pytest(11):assert断言

摘要: 前言 一条测试用例必须要有断言才是完整的用例,没有断言的用例是没有灵魂的,虽然断言的作用非常大,但使用起来非常简单。 例子: # content of test_sample.py def inc(x): return x + 1 def test_answer(): assert inc(3) = 阅读全文

posted @ 2020-10-13 16:20 曾小懒 阅读(134) 评论(0) 推荐(0)