Test that a bench of features reads no places
CI / tests (pull_request) Successful in 3m45s

This commit is contained in:
2026-11-23 17:30:29 +01:00
parent b355a2025c
commit 20105231fc
+7
View File
@@ -207,6 +207,13 @@ class FeatureBenchTest(unittest.TestCase):
self.assertEqual(found.reason, reason)
self.assertFalse(self.log.exists())
def test_reads_no_places_of_the_seats_since_no_bug_is_planted_at_them(self):
argv = [part for name, value in self.given.items() if name != "--runs" for part in (name, value)]
with contextlib.redirect_stderr(io.StringIO()) as told, contextlib.redirect_stdout(io.StringIO()) as report:
code = main.main(argv, self.env, read=lambda home: Failure("the history cannot be read"))
self.assertNotIn("the history cannot be read", told.getvalue())
self.assertEqual((code, report.getvalue()[:12]), (0, "task-bench: "))
def test_a_file_beside_the_features_folders_is_no_feature(self):
(self.tasks / "README.md").write_text("# Features\n")
self.assertEqual([found.name for found in features(self.tasks)], ["halve"])