Auto add numbers
Now you will practice declaring autouse. At the start, you have an empty Python list. And there is a function that adds some elements to it. Add autouse to the add_numbers_to_list() fixture function, so you could use it without explicitly requesting from the test function. And finally complete the assertion tests by checking if 1 is in init_list and if 9 is in init_list.
Questo esercizio fa parte del corso
Introduction to Testing in Python
Esercizio pratico interattivo
Passa dalla teoria alla pratica con uno dei nostri esercizi interattivi
Inizia esercizio