Move loop-claude's cycle, judge, interrupt, tmux and routing into agent_cycle
CI / tests (pull_request) Failing after 3m50s
CI / tests (pull_request) Failing after 3m50s
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import ast
|
||||
import pathlib
|
||||
import unittest
|
||||
|
||||
PACKAGE = pathlib.Path(__file__).resolve().parent
|
||||
# The packages of the entry points that drive a cycle.
|
||||
ENTRY_POINTS = ("loop_claude", "do_epic")
|
||||
|
||||
|
||||
class Imports(unittest.TestCase):
|
||||
def test_no_module_imports_an_entry_points_package_so_a_second_entry_point_drives_the_cycle_alone(self):
|
||||
imported = []
|
||||
for path in sorted(PACKAGE.glob("*.py")):
|
||||
for node in ast.walk(ast.parse(path.read_text())):
|
||||
names = [node.module or ""] if isinstance(node, ast.ImportFrom) else [alias.name for alias in node.names] if isinstance(node, ast.Import) else []
|
||||
imported += [(path.name, name) for name in names if name.split(".")[0] in ENTRY_POINTS]
|
||||
self.assertEqual(imported, [])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in New Issue
Block a user