Exemple #1
0
class Test_sub:
    def setup_class(self):
        print("减法测试开始")
        self.cal = Cal()

    def teardown_class(self):
        print("减法测试结束")

    @pytest.mark.run(order=2)
    @pytest.mark.parametrize('a,b,result',
                             get_subdata()[0],
                             ids=get_subdata()[1])
    @allure.story(f"{get_adddata()[1]}")
    def test_sub(self, a, b, result, funt):
        assert result == round(self.cal.sub(a, b), 2)
Exemple #2
0
 def setup_class(self):
     print("减法测试开始")
     self.cal = Cal()