Clear import directory, possibly

This commit is contained in:
sebastien committed 2026-10-06 11:26:03 +02:00
1 parent 52a8589261
commit 22c04f6e15
7 files changed
+88 -6

No files matched your search

+13
View File
@@ -2705,6 +2705,19 @@ class WorkflowTests(unittest.TestCase):
)
self.assertEqual(command[4], "annotate-grouped")
def test_annotation_import_cleanup_defaults_to_configured_folder(self) -> None:
for configured in (None, "", Path("Import")):
with patch.object(workflow_module.configuration, "IMPORT_DIR", configured):
step = next(step for step in build_workflow(False) if step.id == "annotation")
for variant in step.variants:
with self.subTest(configured=configured, variant=variant.id):
command = build_command(REPOSITORY, step, variant, {}, self.evaluation)
self.assertEqual("--clear-import" in command, bool(configured))
command = build_command(
REPOSITORY, step, variant, {"clear_import": False}, self.evaluation
)
self.assertNotIn("--clear-import", command)
def test_copy_preparation_commands_are_python(self) -> None:
rotate = self.command("rotate", "rotate", {"target": self.evaluation})
rename = self.command("rename", "rename", {"target": self.evaluation})