Discussion:
[TIP] REG: Changing standard test discovery
arun kali raja
2018-05-16 14:52:54 UTC
Permalink
Hi,

The pytest page on changing test discovery
<https://docs.pytest.org/en/latest/example/pythoncollection.html> has
information on how to ignoring a set of paths/testcases.

I want to do something reverse.. I have organised the tests in multiple
folders in terms of the codeArea they cover.

If the user triggers tests of codeArea say 'X', i have some identified
codeAreas 'Y' and 'Z' whose tests should also be executed.

How to achieve this in pytest?
--
Regards
Arun kaliraja.B
Bruno Oliveira
2018-05-16 15:24:22 UTC
Permalink
Hi Arun,

There's the `testpaths` variable that might be useful, otherwise I'm sure
you can cook something yourself using some hooks, specially
`pytest_collection_modifyitems`.

Hope this helps,
Bruno
Post by arun kali raja
Hi,
The pytest page on changing test discovery
<https://docs.pytest.org/en/latest/example/pythoncollection.html> has
information on how to ignoring a set of paths/testcases.
I want to do something reverse.. I have organised the tests in multiple
folders in terms of the codeArea they cover.
If the user triggers tests of codeArea say 'X', i have some identified
codeAreas 'Y' and 'Z' whose tests should also be executed.
How to achieve this in pytest?
--
Regards
Arun kaliraja.B
Loading...