<2>pytest:简单示例

目录:测试自动化学习 - pytest
说明:本篇博客基于pytest 6.2.5



python文件:demo.py

# content of test_sample.py

def inc(x):
    return x + 1


def test_answer():
    assert inc(3) == 5

运行方法

在终端中,执行pytest demo.py

posted @ 2021-12-06 17:25  漓白  阅读(49)  评论(0编辑  收藏  举报