Bench adding a data source in task-bench, from a register a seeded script generates
This commit is contained in:
@@ -80,7 +80,9 @@ def added(path: str) -> str:
|
||||
return f"diff --git a/{path} b/{path}\nnew file mode 100644\n--- /dev/null\n+++ b/{path}\n@@ -0,0 +1 @@\n+exit 0\n"
|
||||
|
||||
|
||||
class FeatureBenchTest(unittest.TestCase):
|
||||
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."""
|
||||
|
||||
def setUp(self):
|
||||
folder = tempfile.TemporaryDirectory()
|
||||
self.addCleanup(folder.cleanup)
|
||||
@@ -121,6 +123,8 @@ class FeatureBenchTest(unittest.TestCase):
|
||||
with contextlib.redirect_stderr(io.StringIO()) as self.progress:
|
||||
return main.bench({**self.given, **given}, self.env, lambda home: "", self.home)
|
||||
|
||||
|
||||
class FeatureBenchTest(BenchOfTasksCase):
|
||||
def test_has_haiku_build_each_feature_at_both_sides_and_checks_it_with_the_acceptance_tests_it_never_saw(self):
|
||||
# Neither counts: one's acceptance tests pass before it is built, and the other's reference patch doesn't apply at the head.
|
||||
feature(self.tasks / "stale", acceptance="exit 0\n", test="stale_test.go")
|
||||
@@ -284,7 +288,7 @@ class OptionsTest(unittest.TestCase):
|
||||
def test_tasks_names_the_kind_of_task_and_bugs_is_the_default(self):
|
||||
self.assertEqual(self.options()["--tasks"], "bugs")
|
||||
self.assertEqual(self.options("--tasks", "features")["--tasks"], "features")
|
||||
self.assertEqual(self.options("--tasks=chores").reason, "--tasks takes bugs or features, not chores")
|
||||
self.assertEqual(self.options("--tasks=chores").reason, "--tasks takes bugs, features or data-sources, not chores")
|
||||
|
||||
def test_features_run_5_times_at_each_side_by_default(self):
|
||||
self.assertEqual(self.options("--tasks", "features")["--runs"], "5")
|
||||
|
||||
Reference in New Issue
Block a user