摘要:
使用assert语句进行断言 pytest允许使用标准的python assert语法,用来校验expectation and value是否一致 代码演示: def func(): return 3 def test_func(): assert func() == 4 执行结果: (wda_py 阅读全文
摘要:
自动化测试框架 - pytest pytest是Python最流行的单元测试框架之一, 帮助更便捷的编写测试脚本, 并支持多种功能复杂的测试场景, 能用来做app测试也能用作函数测试 官方文档: https://docs.pytest.org/en/latest/ pytest具有以下优点: 允许使 阅读全文