This month I gave a presentation to introduce MadPUG’s members to Testing. The topics we covered were:
-
Testing Philosophy
-
What is a unit of code?
-
What is a unit test?
-
What is an integration test?
-
What is test independence and why is it important?
-
What is code coverage? Why is it important? What is it good for?
-
Test Driven Development
-
-
Unittest - The Python Standard Library
-
Examples of tests written with unittest.
-
Examples of how to extend unittest.
-
-
Py.test and why it is great.
- Using py.test’s fixtures.
-
Mock
-
What is a mock?
-
Mocking out objects.
-
Patching objects and instances of objects.
-
When using the mock library is not appropriate.
-
The example code and tests that were written for the presentation are available under the MIT License on GitHub.