-
Notifications
You must be signed in to change notification settings - Fork 23
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
Custom Plugin how to get Subtest Details? #140
Comments
If you want to access the report, implement the |
@nicoddemus Ok it seems like the hooks like Here is an example test:
And a plugin:
Running my test results in:
Note how this will only let me get access to subtests created with the pytest Do you have any suggestions? I have some old code that is using TestCase which I would prefer not to rewrite in the pytest style if possible. |
Not sure, this works for me:
🤔 |
Interestingly, it was not printing because I was not running with Thanks for your help on this. If it is convenient, it might be a good idea to somehow make this
|
Indeed we suspend the output capture before reporting in pytest-subtests/src/pytest_subtests/plugin.py Lines 270 to 271 in cbff3e1
But do not suspend for pytest-subtests/src/pytest_subtests/plugin.py Lines 117 to 119 in cbff3e1
The former was implemented in #10, might have been just an oversight that the same handling was not done for Would you be so kind as to open a separate issue with the difference in handling |
Done, please see here |
Thanks @mkmoisen appreciate it |
I have a custom plugin that takes the results of my tests and saves them to a database.
When I use pytest, the custom plugin doesn't seem to get the subtest details.
Here is an example of the hooks that I'm using.
Each of these
items
is for a top level test, not a subtest.Is it possible to get access to the subtest level details?
The text was updated successfully, but these errors were encountered: