Run your tests with multiple Python versions

less than 1 minute read

Maybe you have developed an application using python3.9 and you claim it works with >= python3.7. But have you tested it?

Between major Python3 versions, some features are deprecated and some even removed. In addition, as most Python projects, yours will have a lot of third-party dependencies that may have not been tested with multiple Python3 versions either.

This is why it’s important to run your functional tests with all the Python versions you claim to support. You should do it at least once before release in a CI pipeline. In the pipeline that runs every time you push commits, you can run the tests with the latest version only to avoid slowing it down.

In addition, to catch deprecations and removals earlier, you can run the static code analysis tools with multiple interpreters too.

Categories:

Updated:

Leave a comment