Do you need any help?

HW2req non parte il test

a
andrea_B25 (260 points)
1 3 5
asked Oct 30, 2020 in HW2 obbligatorio by andrea_B25 (260 points)
recategorized Oct 30, 2020 by andrea.sterbini

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? 

189 views

3 Answers

andrea.sterbini (167420 points)
487 897 1726
answered Oct 30, 2020 by andrea.sterbini (167,420 points)

angry INSTALLATE STOPIT!!!!! angry

1946981 (3070 points)
4 13 34
answered Oct 30, 2020 by 1946981 (3,070 points)
Credo tu non abbia scaricato la libreria stopit perché dice no module named 'stopit' found
9
9Andrea9 (12340 points)
10 30 55
answered Oct 30, 2020 by 9Andrea9 (12,340 points)
a destra della pagina puoi trovare la voce  "SOFTWARE DA INSTALLARE" quelli in rosso sono essenziali, per scaricarli dovrai prendere il codice presente nella terza colonna