class TestMy: def test_a(self): assert 1==1 def test_b(self): assert 1>2 # main(['{}::{}'.format(__file__,TestMy.__name__)]) if __name__ == '__main__': pytest.main(["-q",'--html=report.html','test_1.py'])
用代码运行pytest,并生成测试报告
Copyright © 2024 大白不白
Powered by .NET 9.0 on Kubernetes