Skip to content

How to selectively enable a plugin? #5272

Closed
@jaraco

Description

@jaraco

I'm trying to use pytest-black, but it only installs on Python 3 and I still have projects that depend on Python 2.

Using tox, I attempted to configure the environment to exclude that plugin on Python 2, but when I do, I still get failures when the tests are not explicitly invoked with "py27" but still get Python 2.7.

Is there something I can do to cause pytest to run as if --black is indicated, but only when pytest-black is installed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questiongeneral question, might be closed after 2 weeks of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions