Search code examples
pythonpytestpytest-fixtures

how to define a pytest plugin in a setuptools pyproject.toml?


According to pytest documentation, plugins must be registered as entry points so I want ot find the pyproject.toml equivalent to:

entry_points={
    "pytest11": [
        "copie = pytest_copi.plugin",
    ],
}

Solution

  • As per Setuptools documentation, the correct syntax for this entry point should be:

    [project.entry-points.pytest11]
    copie = "pytest_copie.plugin"