fixture ‘apply_condition‘ not found ...... use ‘pytest --fixtures [testpath]‘ for help on them
从git上拉下来的项目,运行的时候 具体报错信息如下:________________________ ERROR at setup of test_label _________________________file C:\tojoy\policy_copy\test\test_label.py, line 13def test_label(apply_condition):Efixture
从git上拉下来的项目,运行的时候 具体报错信息如下:
________________________ ERROR at setup of test_label _________________________
file C:\tojoy\policy_copy\test\test_label.py, line 13
def test_label(apply_condition):
E fixture 'apply_condition' not found
> available fixtures: cache, capfd, capfdbinary, caplog, capsys, capsysbinary, doctest_namespace, monkeypatch, pytestconfig, record_property, record_testsuite_property, record_xml_attribute, recwarn, tmp_path, tmp_path_factory, tmpdir, tmpdir_factory
> use 'pytest --fixtures [testpath]' for help on them.
出现这个问题的原因是因为函数名称中带有test 单词,把函数名字改掉之后就可以正常运行。
这是为什么? 从网上找了好久 说是与python 自带的test函数冲突,谁有更好的解释麻烦告诉我一下,感谢!
更多推荐
所有评论(0)