pytest-autofocus
Auto-focus plugin for pytest: run only @pytest.mark.focus tests when --auto-focus is set, otherwise run all tests.
Installation
pip install pytest-autofocus
Usage
Mark tests with @pytest.mark.focus:
import pytest
def test_normal():
pass
@pytest.mark.focus
def test_focused():
pass
Run with --auto-focus to run only focused tests (if any exist), otherwise run all tests:
pytest --auto-focus
If no tests are marked with @pytest.mark.focus, all tests run normally.
Run without --auto-focus to run all tests:
pytest
pytest-watcher Integration
Use with pytest-watcher for automatic test filtering:
ptw . -- --auto-focus
Requirements
- Python 3.10+
- pytest 7.0+
Metadata
Release files for pytest-autofocus 0.1.2
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 |
|---|---|---|---|---|
| pytest_autofocus-0.1.2.tar.gz | 5.5 kB | Without provenance | Details for pytest_autofocus-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pytest_autofocus-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for pytest_autofocus-0.1.2-py3-none-any.whl |
Total release size: 8.9 kB
Release files / pytest_autofocus-0.1.2.tar.gz
| Download URL | pytest_autofocus-0.1.2.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
86ce65a1cd253c6d69bfc125ee145e1e0fb0662bf8972928530c837bb4c49bb2
|
|
BLAKE2b-256 checksum How to use checksums |
405e35e28a1b13b0a18da585482f72797ff023eecbdeba5159a8c6dcbe23a331
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Release files / pytest_autofocus-0.1.2-py3-none-any.whl
| Download URL | pytest_autofocus-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c2c19b7514dc009f9eef8f9675d8e3cd5d22b4e4f744956ad84d977b222723e5
|
|
BLAKE2b-256 checksum How to use checksums |
63bb37231ea55481324e9b343a8dc3c476e6d7d3d2fa2b0c0f8eabef25b4a6a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.2
|
Security for pytest-autofocus 0.1.2
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.