[Pytest-commit] Issue #477: excluding name patterns from consideration (hpk42/pytest)

faassen issues-reply at bitbucket.org
Thu Mar 6 12:52:56 CET 2014


New issue 477: excluding name patterns from consideration
https://bitbucket.org/hpk42/pytest/issue/477/excluding-name-patterns-from-consideration

faassen:

Today I ran into the following. I started using a library called webtest, which exposes a class called TestApp which can be used to test WSGI apps.

The very act of doing this:

```
from webtest import TestApp
```

would trigger pytest to consider TestApp as something to find tests on, but would then immediately skip it. The skipping process is visible and at least the display of it is so slow you actually see the number increased: for 9 modules that import TestApp, the number goes up to 9.

I'd like a way to configure pytest to exclude the pattern 'TestApp' from any consideration whatsoever. I think this may be possible using pytest_pycollect_makeitem, but that got quickly rather complicated. Could a configuration option be added for this use case?





More information about the pytest-commit mailing list