diff --git a/cloud/tests/test_handler_split_conformance.py b/cloud/tests/test_handler_split_conformance.py index 8d71c73..8bf7db3 100644 --- a/cloud/tests/test_handler_split_conformance.py +++ b/cloud/tests/test_handler_split_conformance.py @@ -144,7 +144,11 @@ class TestReexports(unittest.TestCase): class TestMethodAccounting(unittest.TestCase): - def test_total_244_no_duplicates(self): + # 演练注:合入后总数 244 -> 247、server.py 自有 150 -> 153, + # 增量全是 main 侧方法(_routing_shadow、_resolve_create_ + # agent_definition、_validate_create_audit_loop),源线方法 + # 零丢失、mixin 侧零增减;此为源线 34b9a34 同款 re-pin。 + def test_total_247_no_duplicates(self): seen = {} dups = [] classes = [CloudControlPlaneHandler] @@ -159,9 +163,9 @@ class TestMethodAccounting(unittest.TestCase): dups.append((seen[name], cls.__name__, name)) seen[name] = cls.__name__ self.assertEqual(dups, []) - self.assertEqual(total, 244) + self.assertEqual(total, 247) self.assertEqual(len(_own_methods(CloudControlPlaneHandler)), - 244 - 94) + 247 - 94) if __name__ == "__main__": diff --git a/cloud/tests/test_longfunc_inventory.py b/cloud/tests/test_longfunc_inventory.py index 0d0cc9a..7847ac8 100644 --- a/cloud/tests/test_longfunc_inventory.py +++ b/cloud/tests/test_longfunc_inventory.py @@ -48,11 +48,14 @@ EXPECTED_METHODS = { ("server.py", "CloudControlPlaneHandler._dispatch_task_route"), ("server.py", "CloudControlPlaneHandler._dispatch"), ("server.py", "CloudControlPlaneHandler._dispatch_project"), + # 演练注:main 侧 _routing_shadow(233 行)为第 18 个长方法; + # 另 2 个 main 侧新增方法均 <=100 行,不进清单。 + ("server.py", "CloudControlPlaneHandler._routing_shadow"), } class LongFuncInventoryTestCase(unittest.TestCase): - def test_seventeen_long_methods_including_full_auto_execute(self): + def test_eighteen_long_methods_including_full_auto_execute(self): cloud_dir = Path(__file__).resolve().parents[1] methods = set() module_funcs = set() @@ -75,7 +78,7 @@ class LongFuncInventoryTestCase(unittest.TestCase): lines = node.end_lineno - node.lineno + 1 if lines > 100: module_funcs.add((path.name, node.name)) - self.assertEqual(len(EXPECTED_METHODS), 17) + self.assertEqual(len(EXPECTED_METHODS), 18) self.assertIn( ("handler_fullauto.py", "FullAutoMixin._full_auto_execute"), EXPECTED_METHODS)