-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High memory usage if tests called by test case name #1521
Comments
can you outline used pytest-plugins and py.test versions as well? at first glance i fear, that we run collection multiple times on the same file, i'll try to verify this week |
ok I tried both with:
but also with an old version:
|
thanks for verifying that the issue is with python 2.6 (which is EOL) |
Wait a moment. |
Any news about this issue? |
i didn't find the time to look at it again so far |
Sorry, have you checked this? |
i still didnt manage to look into detail my first idea idea for fixing it is to go in, and split node-id based collection, into a plugin that inhibits collection outside of the requested items it would be a class which implements a make-item hook wrapper and discards undesirable results |
@RonnyPfannschmidt that sounds like a good idea. Perhaps @fontealpina can implement that hook into his |
I'm experiencing an high memory usage if the tests to run are called by test case name instead of test file name.
To explain my issue I will use the following trivial test, called
test_try.py
:If I want to run all the tests, I can type:
But in my workflow may be useful call the tests by test case name, so:
In the first case there are 3 collected items, while in the second case the collected items are 12.
I guess that for every test case there are 4 test collected(3 for all the test case in the file and one for the real test case to run).
If this approach is applied on a larger scale (for instance with many test files that contains many test), I observed a huge increase of memory usage.
I was wandering if there is an easy way to collect only the single test case in order to lower the number of test collected and so the memory usage?
Thanks
The text was updated successfully, but these errors were encountered: