在Pycharm中,我希望有条件地运行集成测试,但总是运行单元测试。
Integration tests are named like this: itest_<module name>.py.
Unit tests are named like this: test_<module name>.py
这可以通过某种运行/调试配置或其他配置/代码技巧来实现吗?
我处理这件事的方式是将测试命名为test_,将集成测试命名为itest_。然后我将discovery与模式*test_结合使用。