Dans le cours : Create an Open-Source Project in Python

Accédez au cours complet aujourd’hui

Inscrivez-vous aujourd’hui pour accéder à plus de 23 200 cours dispensés par des experts.

Checkpoint: What you have so far

Checkpoint: What you have so far

- [Instructor] We have come to the end of this chapter so let's sum up what we have learned so far. First of all, we were introduced to pytest, a popular testing library and we used it to write some tests for our mock project. We explore some features of pytest such as parameterize which can combine similar tests into one test with multiple parameters, which helps tidy up your code. We have also learned how to test for expected exceptions and how to treat them appropriately. We also learned about fixture which allow us to take some elements that is irrelevant to the test out of the test itself. This makes managing the test much easier. Last but not least, we know what to do if we have tests that are expected to fail under certain conditions. We can then skip the test or mark it as known fail. This way, we can get past the test and not block further development. Now before we move on let's check if we still have all the…

Table des matières