Testing is essential for code quality. Tests need to be automated and regularly run to benefit from them. Frameworks such as pytest are based on many years of exercise and help you apply best practices to your tests. Apart from integrating with existing unittest/nose test suites, pytest offers some unique features for writing and organizing your test code.
Testing and releasing your code for many different Python versions and implementations can be hard. The new library tox is an effect tool to integrate testing and deployment. It works with and connects to established tools including those for Continuous Integration.
Applying the Python philosophy that simple things should be simple and complex task should be possible, pytest and tox make it easy to get started but at the same time provide powerful features for professional software development.
In 30 steps we introduce terms and tools for testing in Python. Each step consists of an input, discussion and self-practice phase. The main topics of the course are:
Testing terms: functional, unit, integration, acceptance
Test driven development, "after it work" and legacy-code testing
pytest basic usage: command line options, test discovery, capturing
stdout, assert, expecting exceptions, interactive debugger, simple fixtures
Integrating nose, twisted, django and unittest/2 style tests
Load balancing across multiple CPUs or machines
Configuring and using test coverage analysis
Special test outcomes: skip, xfail and when to use them
Using fixture functions for managing test state in a modular, scalable and
Using builtin fixture functions and fixtures from plugins
When and how to use mocking to avoid expensive setups
Understanding plugin hooks and writing your own plugins
Using tox to run tests against installed libraries and applications
Using tox to build and test sphinx documentation
Using tox to integrate with Jenkins CI or travis-ci.org
Each bullet point will be covered with two to three short units with exercises.
+49 341 260 3370