Open-sourcing Python Test Runner for multiple tests in parallel
source link: https://www.tuicool.com/articles/hit/BRvMvyv
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
WHAT’S NEW:
A new Python-based project called Python Test Runner ( ptr
), that allows developers to run Python unit test suites. The main difference between ptr
and existing test runners is that ptr
crawls a repository to find Python projects with unit tests defined in their setup files. It then runs each suite in parallel with configured enabled steps.
WHY IT MATTERS:
The ptr
project started with Facebook Connectivity
as a way to provide a lightweight tool using standard open source Python components. It was created to allow our external partners to run the same type of continuous integration we use internally. Supported and tested on Linux, MacOS, and Windows, ptr
allows developers to test multiple projects in one Python environment and run the tests in parallel.
To achieve this, ptr
recursively searches for setup.(cfg|py)
from BASE_DIR
(-b) and parses the found setup files for ptr
configuration. If setup.(cfg|py)
exists with ptr
configuration, ptr
runs the tests. When running test suites in parallel, all steps will be run for each suite until failure, and only failed runs will have their output written to stdout
.
USE IT FOR:
ptr
has four main use cases:
- Running a Python test suite
- Optionally checking and enforcing code coverage requirements
- Optionally formatting and linting Python code
- Optionally performing static type analysis
GET IT ON GITHUB:
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK