A pytest plugin which makes `--last-failed` skip instead of deselect tests.
Project description
pytest-lf-skip
A pytest plugin which makes --last-failed skip instead of deselect tests.
I made this plugin to resolve a small but annoying-enough issue that I encountered in VS Code where the test panel would not show all of my tests when I had the --last-failed option enabled for pytest, due to the previously passed tests being deselected instead of skipped.
Installation
You can install pytest-lf-skip from pip:
pip install pytest-lf-skip
Usage
Just add the --lf-skip or --last-failed-skip argument to your pytest command when you use --last-failed:
pytest --last-failed --last-failed-skip
Now previously passed tests will be skipped instead of being deselected.
VS Code
If you are using VS Code, you can make use of the --auto-last-failed-skip-vscode argument, which will automatically enable --lf and --lf-skip when running tests from the VS Code test explorer.
To enable this, add the following to your settings.json:
{
"python.testing.pytestArgs": [
"--auto-last-failed-skip-vscode",
]
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_lf_skip-1.2.0.tar.gz.
File metadata
- Download URL: pytest_lf_skip-1.2.0.tar.gz
- Upload date:
- Size: 85.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2d10fa2d71e194f9ff338df05b4425c546267b1a77a177df432bcf3218ee4215
|
|
| MD5 |
37bf77124885f5bf33249bab3468d7a8
|
|
| BLAKE2b-256 |
f9788b8894cc6fc2225ba1b7a648850c9e4e31f600d4d8704b26f21fad1afef6
|
File details
Details for the file pytest_lf_skip-1.2.0-py3-none-any.whl.
File metadata
- Download URL: pytest_lf_skip-1.2.0-py3-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
783367b04df3beb2dfd440b5833644300ee07f435eb31a8978b8b4eb71715fdf
|
|
| MD5 |
b3eca50883fcc24c7b17061fbe48ff5b
|
|
| BLAKE2b-256 |
0baaca7832ff0bfbd061b2815c2f1c9e86b8199f07c7f775a4c0f3e9fdcf43ff
|