【发布时间】:2020-11-10 19:50:55
【问题描述】:
我在名为 test_me.py 的 python 模块中有以下代码:
@pytest.fixture()
def test_me():
if condition:
pytest.skip('Test Message')
def test_func(test_me):
assert ...
输出如下:
tests/folder/test_me.py::test_me SKIPPED
问题:“测试消息”在哪里打印或输出?我在任何地方都看不到或找不到它。
【问题讨论】:
-
我打算让你参考官方文档,但它似乎没有解释这一点。
-
@KarlKnechtel 完全正确。我从原始文档中得到了使用此功能的想法,但它似乎并没有像我预期的那样工作。
标签: python