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
I have tried to implement a custom test distribution logic for my test suite based on this suggestion: #18 (comment).
fromxdist.schedulerimportLoadScopeSchedulingclassFixtureScheduling(LoadScopeScheduling):
"""Split by [] value. This is very hackish and might blow up any time! """def_split_scope(self, nodeid):
if'['innodeid:
returnnodeid.rsplit('[')[-1].replace(']', '')
returnNonedefpytest_xdist_make_scheduler(log, config):
returnFixtureScheduling(config, log)
I could make the logic a bit more robust, but for now I do not seem to be able to get this to work. I have both tried to adding this to the specific test file where this is needed and tried adding this to the conftest.py file, but neither seems to have any effect and it seems that the default scheduler is used regardless. I may have misunderstood how to use these pytests hooks, so any help is highly appreciated.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have tried to implement a custom test distribution logic for my test suite based on this suggestion: #18 (comment).
I could make the logic a bit more robust, but for now I do not seem to be able to get this to work. I have both tried to adding this to the specific test file where this is needed and tried adding this to the
conftest.py
file, but neither seems to have any effect and it seems that the default scheduler is used regardless. I may have misunderstood how to use these pytests hooks, so any help is highly appreciated.Beta Was this translation helpful? Give feedback.
All reactions