Skip to content

Commit 3de0454

Browse files
try to fix tests
question is why GALAXY_CONFIG_OVERRIDE_FILE_PATH is not set in the tests
1 parent 0a644bf commit 3de0454

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

planemo/galaxy/test/actions.py

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -128,17 +128,18 @@ def run_in_config(ctx, config, run=run_galaxy_command, test_data_target_dir=None
128128
# check if tools created extra files in the file_path all files in the files path
129129
# - end with '.dat' or
130130
# - are contained in a directory `dataset_.*_files`
131-
for (path, dirs, files) in os.walk(config.env["GALAXY_CONFIG_OVERRIDE_FILE_PATH"]):
132-
for name in files:
133-
if not (name.endswith(".dat") or re.match('.*/dataset_.*_files$', path)):
134-
extra_files.append(os.path.join(path, name))
135-
if len(extra_files) > 0:
136-
msg = f"One of the tested tools wrote to Galaxy's files dir: {extra_files}"
137-
for i in range(len(structured_data["tests"])):
138-
structured_data["tests"][i]["data"]["status"] = "failure"
139-
structured_data["tests"][i]["data"]["job"]["stderr"] += msg
140-
error(msg)
141-
ec = 1
131+
if os.walk(config.env.get("GALAXY_CONFIG_OVERRIDE_FILE_PATH")):
132+
for (path, dirs, files) in os.walk(config.env.get("GALAXY_CONFIG_OVERRIDE_FILE_PATH")):
133+
for name in files:
134+
if not (name.endswith(".dat") or re.match('.*/dataset_.*_files$', path)):
135+
extra_files.append(os.path.join(path, name))
136+
if len(extra_files) > 0:
137+
msg = f"One of the tested tools wrote to Galaxy's files dir: {extra_files}"
138+
for i in range(len(structured_data["tests"])):
139+
structured_data["tests"][i]["data"]["status"] = "failure"
140+
structured_data["tests"][i]["data"]["job"]["stderr"] += msg
141+
error(msg)
142+
ec = 1
142143
return handle_reports_and_summary(
143144
ctx,
144145
structured_data,

0 commit comments

Comments
 (0)