Skip to main content

Expand command-line shortcuts listed in pytest configuration

Project description

pytest-shortcuts

Expand command-line shortcuts listed in pytest configuration

This pytest plugin was generated with Cookiecutter along with @hackebrot's cookiecutter-pytest-plugin template.

Getting Started

Install using your favourite python package manager:

$ pip install pytest-shortcuts

Add some shortcuts to your pytest configuration:

[pytest]
shortcuts =
    --live: -m "live and not slow"
    --slow: -m "live and slow"
    --offline: --disable-socket -m "not live"

Now when you run your tests with eg --live, it will be as if you provided -m "live and not slow".

For each shortcut, you can also define a dotenv file to load with custom configuration:

[pytest]
shortcuts =
    --live: -m "live and not slow"
    --slow: -m "live and slow"
envfiles =
    --live: .live.env

License

Distributed under the terms of the BSD-3 license, "pytest-shortcuts" is free and open source software

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-shortcuts-0.1.0.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

pytest_shortcuts-0.1.0-py3-none-any.whl (4.1 kB view hashes)

Uploaded Python 3

Supported by

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