Ronny, Bruno,

On Mon, Mar 12, 2018 at 8:10 PM, Bruno Oliveira <>

> Hi Ringo,
> It is as Ronny said, you can see the code responsible for that here:
> When the file has a `.py` extension and is one of the "inipaths" (paths
> given explicitly in the command line), then the `python` plugin will
> collect that file anyway.

That's a pitty. Given the pluggability of pytest, each plugin could have a
way to collect files and offer test suites back to pytest. Isn't there a
way to specify one of my spec tests without the wrong plugin(s) picking up
this file?

> You can override this by implementing your own `pytest_collect_file` and
> return non-`None` when a `.py` file inside the specs directory is passed in
> the command-line.
 Bruno, my plugin is collecting the file specified on the command line
correctly, but still the python plugin tries to run it too. That's where it
goes wrong.

pytest-dev mailing list

Reply via email to