Something went wrong. Try again.
small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142"""Explicitly selected E2E files must keep all their scenarios.
A daemon scenario cannot detect that the local gate omitted it."""
from pathlib import Pathimport sysimport unittestfrom unittest.mock import patch
sys.path.insert(0, str(Path(__file__).resolve().parents[2] / "e2e"))import e2e_select # noqa: E402
class E2ESelectionTests(unittest.TestCase): def test_changed_file_supersedes_its_smoke_method_at_any_budget(self): module = "daemon_test.py" smoke = next(name for name in e2e_select.SMOKE if name.startswith(module + ":")) for duration in (1, 120): with ( self.subTest(duration=duration), patch.object(e2e_select, "durations", return_value={module: duration}), ): selected, _ = e2e_select.select(["e2e/daemon_test.py"]) self.assertIn(module, selected) self.assertNotIn(smoke, selected)
def test_smoke_method_charges_only_its_own_duration(self): module = "daemon_test.py" smoke = next(name for name in e2e_select.SMOKE if name.startswith(module + ":")) optional = "schedule_test.py" with patch.object( e2e_select, "durations", return_value={module: 200, smoke: 2, optional: 5} ): selected, _ = e2e_select.select(["misc/schedule.gleam"]) self.assertIn(smoke, selected) self.assertIn(optional, selected)
def test_deleted_test_file_is_not_requested_from_runner(self): selected, _ = e2e_select.select(["e2e/retired_scenario_test.py"]) self.assertNotIn("retired_scenario_test.py", selected)