ciao a tutti,
attualmente ho installata la versione 3.8.3 di python e uso spyder4
sto cercando di fare i test per HW obbligatorio ma quando vado sul prompt anaconda mi restituisce il seguente errore:
(base) PS C:\Users\Utente\desktop\HW2req> pytest test_01.py -v -rA
================================================= test session starts =================================================
platform win32 -- Python 3.8.3, pytest-5.4.3, py-1.9.0, pluggy-0.13.1 -- C:\Users\Utente\anaconda3\python.exe
cachedir: .pytest_cache
rootdir: C:\Users\Utente\Desktop\HW2req
collected 0 items / 1 error
======================================================= ERRORS ========================================================
_____________________________________________ ERROR collecting test_01.py _____________________________________________
ImportError while importing test module 'C:\Users\Utente\Desktop\HW2req\test_01.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
test_01.py:1: in <module>
import testlib
testlib.py:2: in <module>
import stopit
E ModuleNotFoundError: No module named 'stopit'
=============================================== short test summary info ===============================================
ERROR test_01.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================== 1 error in 0.12s ===================================================
(base) PS C:\Users\Utente\desktop\HW2req>
ho provato a modificare il file Testlib come indicato da altri ma la situazione non cambia..
ho modificato la riga di testlib in questo modo:
print(f"Importing {name} (globals, locals, {fromlist}, {level}) (not allowed)")
Sapete come risolverlo?