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
In my pytest plugin, I generate a lot of tests on the same test function / same class / same module. Using pytest hook pytest_generate_tests
In order to be able to to run just a subset of my tests I would like to create virtual subset of my tests eventhough they are in the end running the same test function.
The idea would be to create a pytest_pycollect_makeitem hook function in my plugin to set a display prop on all my test different from nodeid
def pytest_pycollect_makeitem(self, collector, name, obj):
report = yield
items = report.get_result()
new_results = []
for item in items:
item.display = [display path depending on the test]
new_results.append(item)
return new_results
Then in Vscode testing tab I would have the display prop displayed instead of nodeid, but if we run that test it still runs the nodeid test.
I previously could hack the default vscode implementation, but obviously it broke at the first vscode update because it wasn't meant to do that.
Do you think it would be possible to differentiate the test path displayed and the test path executed?
The text was updated successfully, but these errors were encountered:
In my pytest plugin, I generate a lot of tests on the same test function / same class / same module. Using pytest hook pytest_generate_tests
In order to be able to to run just a subset of my tests I would like to create virtual subset of my tests eventhough they are in the end running the same test function.
The idea would be to create a
pytest_pycollect_makeitem
hook function in my plugin to set a display prop on all my test different from nodeidThen in Vscode testing tab I would have the display prop displayed instead of nodeid, but if we run that test it still runs the nodeid test.
I previously could hack the default vscode implementation, but obviously it broke at the first vscode update because it wasn't meant to do that.
Do you think it would be possible to differentiate the test path displayed and the test path executed?
The text was updated successfully, but these errors were encountered: