Address review

This commit is contained in:
baekdohyeop
2021-11-29 02:49:50 +09:00
parent 1b5d6b6db7
commit 62e50d0097
6 changed files with 65 additions and 38 deletions

View File

@@ -120,15 +120,15 @@ class WorkerInteractor:
# add the group name to nodeid as suffix if --dist=loadgroup
if config.getvalue("loadgroup"):
for item in items:
try:
mark = item.get_closest_marker("xgroup")
except AttributeError:
mark = item.get_marker("xgroup")
if mark:
gname = mark.kwargs.get("name")
if gname:
item._nodeid = "{}@{}".format(item.nodeid, gname)
mark = item.get_closest_marker("xdist_group")
if not mark:
continue
gname = (
mark.args[0]
if len(mark.args) > 0
else mark.kwargs.get("name", "default")
)
item._nodeid = "{}@{}".format(item.nodeid, gname)
@pytest.hookimpl
def pytest_collection_finish(self, session):
@@ -250,7 +250,7 @@ def remote_initconfig(option_dict, args):
def setup_config(config, basetemp):
config.option.loadgroup = True if config.getvalue("dist") == "loadgroup" else False
config.option.loadgroup = config.getvalue("dist") == "loadgroup"
config.option.looponfail = False
config.option.usepdb = False
config.option.dist = "no"