Skip to main content

A pytest plugin which makes `--last-failed` skip instead of deselect tests.

Project description

pytest-lf-skip

PyPI - Version PyPI - Python Version Coverage badge GitHub Actions Workflow Status pre-commit.ci status PyPI - Downloads GitHub commit activity GitHub last commit GitHub commits since latest release

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_lf_skip-1.1.0.tar.gz (84.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_lf_skip-1.1.0-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file pytest_lf_skip-1.1.0.tar.gz.

File metadata

  • Download URL: pytest_lf_skip-1.1.0.tar.gz
  • Upload date:
  • Size: 84.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.2

File hashes

Hashes for pytest_lf_skip-1.1.0.tar.gz
Algorithm Hash digest
SHA256 945805a959eff0fdf3321226b15622e26e52630906f23d1c64c726382ce0f2a2
MD5 996b4fde597b7d2d75140aab5c59f329
BLAKE2b-256 17e9bd6d32402cb011114882c040652ffc873bd8ff33317ed2620b2bddd72c4c

See more details on using hashes here.

File details

Details for the file pytest_lf_skip-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_lf_skip-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 84e745ad4404c0fc34cf6aaa8c9a7011377ed7adf254881d794ff7e53566d30a
MD5 23b5a9ecdc206ccaee645f4b5344f2d1
BLAKE2b-256 cadb65f33398b34b5fe1d2a3abdacc397a00dd6654a52f2410bee2e2a8979ee5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page