Refuse a register entry that is no regular file, and say data source in what task-bench prints

This commit is contained in:
2026-11-23 19:49:22 +01:00
parent c798278406
commit 44c0f13883
11 changed files with 94 additions and 63 deletions
+2 -2
View File
@@ -81,7 +81,7 @@ def added(path: str) -> str:
class BenchOfTasksCase(unittest.TestCase):
"""A checkout whose config names `bench-tasks`, with the feature halve in it, a base and a head, and docker and claude faked."""
"""A checkout whose config names `bench-tasks`, with the feature called `halve` in it, a base and a head, and docker and claude faked."""
def setUp(self):
folder = tempfile.TemporaryDirectory()
@@ -233,7 +233,7 @@ class FeatureBenchTest(BenchOfTasksCase):
(lambda: (self.tasks / "halve/acceptance/halve_test.go").unlink(), f"the feature in {self.tasks / 'halve'} holds no file under acceptance"),
(lambda: (self.tasks / "halve").rename(self.root / "moved"), f"{self.tasks} holds no feature: a folder for each, with spec.md, reference.patch and the acceptance tests under acceptance"),
(lambda: shutil.rmtree(self.tasks), f"could not read the features in {self.tasks}: it is no folder"),
(lambda: self.config.write_text(self.config.read_text().replace('bench-tasks = "checkout:bench-tasks"\n', "")), f"{self.config} sets no `bench-tasks`, the folder of the features to bench, as `project-config --help` describes it"),
(lambda: self.config.write_text(self.config.read_text().replace('bench-tasks = "checkout:bench-tasks"\n', "")), f"{self.config} sets no `bench-tasks`, the folder of the tasks to bench, as `project-config --help` describes it"),
):
with self.subTest(reason=reason):
shutil.rmtree(self.tasks, ignore_errors=True)