Please ignore secret bonuses. Secret tests do NOT award bonus. Max hw grade is 30+2 bonus efficiency

Do you need help?

Problema su Anaconda prompt

A
Adriano Giuliani (260 points)
2 3 5
in Avvisi by (260 points)
Ho provato a fare dei test dell'hw8 su anaconda prompt dopo aver seguito tutte le istruzioni ed aver fatto come ogni altro homework precedente, ma mi da "ERROR: file not found: test.py". Come posso risolvere?
729 views

5 Answers

T
THESHADOW2030 (1070 points)
4 7 15
by (1.1k points)
Perché il file non si chiama test.py ma bensì test01.py
Modifica solo questa parte e teoricamente dovrebbe partire
A
Adriano Giuliani (260 points)
2 3 5
by (260 points)
Il mio file si chiama test01.py
Tommaso Sgroi (12990 points)
10 11 91
by (13.0k points)
Spostati nella cartella del test con i comandi quando stai in anaconda promt
A
Adriano Giuliani (260 points)
2 3 5
by (260 points)
Il percorso che ho immesso per arrivare alla cartella è giusto
Lorenzo Cristini (10830 points)
0 0 27
by (10.8k points)
Il file si chiama test_01.py sei sicuro di non sbagliare? Non dovresti mai rinominare questo tipo di file che servono per fare i test
A
Adriano Giuliani (260 points)
2 3 5
by (260 points)

Ho provato con test_01.py e poi rinominato test01.py e non va

Christian (15220 points)
3 4 77
by (15.2k points)
Qual è precisamente il comando che scrivi?
A
Adriano Giuliani (260 points)
2 3 5
by (260 points)

Ho sempre usato pytest test.py

Christian (15220 points)
3 4 77
by (15.2k points)
Ad esempio questo ti da lo stesso errore? "pytest -rA -v --profile test_01.py"
A
Adriano Giuliani (260 points)
2 3 5
by (260 points)
ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --profile
  inifile: None
  rootdir: C:\Users\*percorso per l'homework*
Christian (15220 points)
3 4 77
by (15.2k points)
A
Adriano Giuliani (260 points)
2 3 5
by (260 points)
Continua a dare lo stesso errore D:
Lorenzo Cristini (10830 points)
0 0 27
by (10.8k points)
—profile non ti funziona perché probabilmente non lo hai installato. Hai per caso aggiornato spyder alla versione 4?

Che errore ti da se fai solamente

pytest test01.py -v -rA?
A
Adriano Giuliani (260 points)
2 3 5
by (260 points)
ho provato anche con (...)test_01.py(...), che è come si chiama il file nella cartella, ma niente
plm (18850 points)
13 15 118
by (18.9k points)

Come hanno già suggerito gli altri, il nome del file dei test è diverso, ovvero test01.py

A
Adriano Giuliani (260 points)
2 3 5
by (260 points)

Ho provato con test_01.py e poi rinominato test01.py e non va