Pytest操作方法

1.先写一个方法 class Calc(): def add(self,a,b): c = a+b return c def jian(self,a,b): c = a-b return c a = Calc() c = a.jian(3,2) print© 2.验证方法是否正确 ①正确的情况下 import pytest #导入pytest模块 from funcDemo.Calc import
相关文章
相关标签/搜索