TA的每日心情 | 擦汗 前天 09:07 |
---|
签到天数: 527 天 连续签到: 4 天 [LV.9]测试副司令
|
1测试积点
我按照作者描述安装好所有库,但是不同文章代码都会出现相同的为题,如下:- Testing started at 09:38 ...
- /home/rhu/anaconda3/bin/python "/media/rhu/New Volume1/pycharm/pycharm-community-2018.3.6/helpers/pycharm/_jb_pytest_runner.py" --path "/media/rhu/SGC/SGC-master/citation.py"
- Launching pytest with arguments /media/rhu/SGC/SGC-master/citation.py in /media/rhu/SGC/SGC-master
- ============================= test session starts ==============================
- platform linux -- Python 3.6.8, pytest-5.3.2, py-1.8.0, pluggy-0.13.1
- rootdir: /media/rhu/SGC/SGC-master
- plugins: allure-pytest-2.8.6, remotedata-0.2.1collected 1 item
- citation.py E
- test setup failed
- file /media/rhu/SGC/SGC-master/citation.py, line 60
- def test_regression(model, test_features, test_labels):
- E fixture 'model' 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.
- /media/rhu/SGC/SGC-master/citation.py:60
- [100%]
- ==================================== ERRORS ====================================
- ______ ERROR at setup of testregression______
- file /media/rhu/SGC/SGC-master/citation.py, line 60
- def test_regression(model, test_features, test_labels):
- E fixture 'model' 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.
- /media/rhu/SGC/SGC-master/citation.py:60
- ============ 1 error in 3.88s =========
- Process finished with exit code 0
复制代码
但是,把代码放到Jupyter 下跑就一点问题没有,所以求助该怎么解决?
|
|