You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally reported by: BitBucket: faassen, GitHub: 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?
Original comment byholger krekel (BitBucket: hpk42, GitHub: hpk42):
Sorry for taking a while to answer: I think about supporting the nose-style "notest" attribute. If pytest finds it on a class or function, it would ignore it. It would mean you would need to set TestApp.notest = True, maybe in your conftest.py file. That's a slight hack but OTOH designing a config option, documenting that, and making it work without introducing too much overhead ... not sure it's worth it. And there would still be the issue of nose-compat.
I was just trying to fix the warning from Pytest that is still emitted with webtest's TestApp. I found this issue, but the response is sligthly wrong, it's not notest, but __test__ = False that is needed, as per Pytest's nose docs.
Originally reported by: BitBucket: faassen, GitHub: 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:
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?
The text was updated successfully, but these errors were encountered: