Skip to content

Commit

Permalink
Generate dangling test data file
Browse files Browse the repository at this point in the history
Signed-off-by: Philippe Ombredanne <[email protected]>
  • Loading branch information
pombredanne committed Sep 6, 2024
1 parent 878be61 commit bc3c5dd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/commoncode/testcase.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,11 @@ def get_test_file_pairs(test_dir, template_to_generate_missing_yaml=None):
dangling_test_files.add(test_file_path)

if not path.exists(data_file_path):
dangling_data_files.add(data_file_path)
if template_to_generate_missing_yaml:
with open(data_file_path, "w") as df:
df.write(template_to_generate_missing_yaml)
else:
dangling_data_files.add(data_file_path)

paths_ignoring_case[file_path.lower()].append(file_path)

Expand Down

0 comments on commit bc3c5dd

Please sign in to comment.