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.
Latihan ini adalah bagian dari kursus
Introduction to Testing in Python
Latihan interaktif praktis
Ubah teori menjadi tindakan dengan salah satu latihan interaktif kami.
Mulai berolahraga