quickunit
Given standard test setup, will determine which tests need to run against a given diff.
For example, say you’re working in your branch called my-new-sexy-feature, which modifies the following files:
src/foo/bar/__init__.py src/foo/bar/baz.py src/foo/biz.py
If you’re using a traditional test layout, we’ll automatically add the following rule for you:
tests/{path}/test_{filename}
Otherwise you can add rules using regular expression syntax in combination with the path and filename formatters.
Now if we run with the default options, nosetests --with-quickunit, it will look for tests (by default) in the following base directories:
tests/src/foo/bar/test_baz.py tests/src/foo/test_biz.py
(It does this by analyzing the diff against master, and determining which files you’ve changed are tests, including them, and which files containing test coverage in a parallel directory.)
Config
If you want to support multiple directories for searching (let’s say you break up unittests from integration tests) you can do that as well:
- ::
–quickunit-rule=tests/{path}/test_{filename} –quickunit-rule=tests/{path}/{basename}/tests.py
Or, if you’d prefer, via setup.cfg:
quickunit-rule = tests/{path}/test_{filename}
tests/{path}/{basename}/tests.py
Rules
Rules are a combination of simple formatting a regular expressions.
The following formatted variables are available within a rule:
- {path}
The base path of the filename (e.g. foo/bar)
- {filename}
The filename excluding the path (e.g. baz.py)
- {basename}
The filename excluding the extension (e.g. baz)
A rule is first formatted (using .format(params)) and then compiled into a regular expression on top of each changed file.
Metadata
Release files for quickunit 0.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| quickunit-0.6.0.tar.gz | 6.5 kB | Without provenance | Details for quickunit-0.6.0.tar.gz |
Release files / quickunit-0.6.0.tar.gz
| Download URL | quickunit-0.6.0.tar.gz |
|---|---|
| Size | 6.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7bf39b90bb009dd63970a6bbfe5d9a9c3d9b305a4282a0dec80439c863129530
|
|
BLAKE2b-256 checksum How to use checksums |
f20aabc1782b20e896eb9f8449a8619f06a5df0ebd3d2726502f4577710d0084
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for quickunit 0.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.