0

https://github.com/Tiiiger/SGC

I want to run the above codes, but there are some issues in my pycharm environment, I work this for two days and I don't find the reasons.

I re-install the related libraries and it doesn't work.

The issues is indicated as:

Testing started at 22:51 ...

/home/rhu/anaconda3/bin/python "/media/rhu/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 test_regression _______________________

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.45s ===============================

Process finished with exit code 0

  • could be due to path issues, see this answer - https://stackoverflow.com/questions/17198319/how-to-configure-custom-pythonpath-with-vm-and-pycharm – Amit Dec 21 '19 at 18:27
  • sorry, I follow this way in the website and I suppose it is not this problem, cas the codes can be run in the jupyter without any issues. – Rongyao Hu Dec 21 '19 at 21:07

0 Answers0