Tests and data for your Python package#
Tests are an important part of your Python package because they provide a set of checks that ensure that your package is functioning how you expect it to.
In this section you will learn more about the importance of writing tests for your Python package and how you can setup infrastructure to run your tests both locally and on GitHub.
Learn more about the art of writing tests for your Python package. Learn about why you should write tests and how they can help you and potential contributors to your project.
There are three general types of tests that you can write for your Python package: unit tests, integration tests and end-to-end (or functional) tests. Learn about all three.
If you expect your users to use your package across different versions of Python, then using an automation tool such as nox to run your tests is useful. Learn about the various tools that you can use to run your tests across python versions here.
Continuous integration platforms such as GitHub Actions can be useful for running your tests across both different Python versions and different operating systems. Learn about setting up tests to run in Continuous Integration here.