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

Do you need help?

Notice Board

Per partecipare al corso di Fondamenti di programmazione 2023-24 loggatevi e attivatelo nella vostra pagina dei corsi preferiti. A quel punto il corso appare nel menù personale cliccando sul proprio avatar. Per i materiali degli anni precedenti seguite lo stesso metodo.

To join the Programming/Lab 2023-24 course, log-on and select it on the my courses page. It will appear on the personal menu of your avatar. For earlier years use the same method.

I'm getting error from: pytest test_01.py -v -rA --profile

matteo_b (950 points)
14 27 33
in HW2 by (950 points)

To test my code I ran the following command in the directory where the source codes are located and I got the following error:

pytest test_01.py -v -rA --profile

ERROR: usage: pytest [options] [file_or_dir] [file_or_dir] [...]
pytest: error: unrecognized arguments: --profile
  inifile: None

447 views

3 Answers

aryanahamed (7920 points)
6 12 67
by (7.9k points)

You didn't install the pytest-profiling library. To install it, open anaconda prompt and run the following command,

conda install -c conda-forge pytest-profiling

Check this page for more info. Link 

P
PeressiniA (1390 points)
0 0 12
by (1.4k points)

If you aren't using anaconda use pip install pytest-profiling in the command prompt

R
Ravoni Adriano (760 points)
0 0 4
by (760 points)
The pytest isn't working because it lacks the extension itself (inifile : None means it doesn't have a file to begin from).

You should just have to go to the HW1 on Q2A and, inside of anaconda prompt, insert the code to the right of the necessary extensions( so conda install etc. etc.).

Remember that there are both pytest timeout and profiling so maybe you only installed one.