Skip to content

Tox support for executing tests against package builds with supported Python distributionsΒ #53

@kieran-ryan

Description

@kieran-ryan

Rather than executing tests against development source code locally, tox can be used to execute tests against package distributions - building them prior to testing - against each supported Python distribution.

This makes it very quick and easy to test builds locally, rather than development code; and can also be executed in the same way in the GitHub workflow - ensuring builds are thoroughly tested locally and through continuous integration with the same builds and test automation tooling.

Overall, this will increase package robustness, testability and development workflow.

An example tox.ini might appear as follows:

[tox]
env_list =
    py37
    py38
    py39
    py310
    py311
minversion = 4.6.4

[testenv]
description = run the tests with pytest
package = wheel
wheel_build_env = .pkg
deps =
    pytest>=6
commands =
    pytest {tty:--color=yes} {posargs}

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Todo πŸ“š

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions