2024-05-15 15:15:21 发布
网友
我想使用pytest来执行测试,作为我的应用程序的一部分(它根据自己的逻辑运行特定的测试)
我想为这些测试提供夹具。它们(那些装置)应该可以访问我的应用程序的内部,所以“pytest.main()”不是一个选项
如何将pytest集成为应用程序库?谢谢
我在pytest问题跟踪器中要求了这个。简短版本:
@pytest.fixture
pytest.main([args], plugins=[instance_of_class])
更长的回答:https://medium.com/python-pandemonium/passing-fixtures-to-test-in-pytest-e8dade1f01ff#.mcedmivel
我在pytest问题跟踪器中要求了这个。简短版本:
@pytest.fixture
创建设备pytest.main([args], plugins=[instance_of_class])
传递更长的回答:https://medium.com/python-pandemonium/passing-fixtures-to-test-in-pytest-e8dade1f01ff#.mcedmivel
相关问题 更多 >
编程相关推荐