Skip to main content

Disable plugins per test

Project description

PyPI version Python versions See Build Status on Travis CI See Build Status on AppVeyor

Disable plugins per test


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

Features

  • Disable pytest plugins for specific tests.

Requirements

  • pytest

Installation

You can install “pytest-disable-plugin” via pip from PyPI:

$ pip install pytest-disable-plugin

Usage

import pytest

@pytest.mark.disable_plugin("some_plugin_name")
def test_something():
    # This test will unload the plugin during setup and reload it afterwards.
    assert f() == 1

def test_something_else():
    # This test will use the plugin as normal.
    assert f() == 2

Contributing

Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.

License

Distributed under the terms of the MIT license, “pytest-disable-plugin” is free and open source software

Issues

If you encounter any problems, please file an issue along with a detailed description.

Project details


Download files

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

Files for pytest-disable-plugin, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size pytest_disable_plugin-0.1.2-py3-none-any.whl (3.9 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size pytest-disable-plugin-0.1.2.tar.gz (3.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page