一、pytest 入门
这是一个测试用例
ch1/test_one.pydeftest_passing():assert (1, 2, 3) == (1, 2, 3)
执行
cd /ch1
pytest test_one.py
结果
(venv) C:\Users\admin\Desktop\ch1>pytest test_one.py======================================= test session starts ====================platform win32-- Python 3.6.8, pytest-6.0.1, py-1.9.0, pluggy-0.13.1rootdir: C:\Users\admin\Desktop\ch1
collected1item
test_one.py . [100%]========================================= 1 passed in 0.01s =====