重构 改为标准化输出
This commit is contained in:
@@ -41,8 +41,13 @@ class ProfileSchemaTests(unittest.TestCase):
|
||||
validate_cdsl(lowered, self.engine)
|
||||
|
||||
def test_schema_and_executable_atomic_operations_stay_in_sync(self) -> None:
|
||||
self.assertEqual(set(self.schema["runtime_supported_atomic_ids"]), set(self.engine.SUPPORTED_ATOMIC_IDS))
|
||||
self.assertEqual(set(self.engine.SUPPORTED_ATOMIC_IDS), set(self.schema["feature_atomic_ids"]))
|
||||
self.assertNotIn("runtime_supported_atomic_ids", self.schema)
|
||||
self.assertNotIn("feature_atomic_ids", self.schema)
|
||||
self.assertEqual(set(self.engine.SUPPORTED_ATOMIC_IDS), set(self.schema["operation_contracts"]))
|
||||
self.assertEqual(
|
||||
set(self.engine.SUPPORTED_ATOMIC_IDS),
|
||||
set(self.engine.materialized_feature_contracts(self.schema)),
|
||||
)
|
||||
self.assertEqual(
|
||||
set(self.cdsl_schema["$defs"]["feature_atomic_ids"]["enum"]),
|
||||
set(self.engine.SUPPORTED_ATOMIC_IDS),
|
||||
@@ -122,12 +127,6 @@ class ProfileSchemaTests(unittest.TestCase):
|
||||
with self.assertRaisesRegex(RuntimeError, "CDSL-only rebuild failed: unsupported atomic_id: extrude"):
|
||||
self.engine.run_rebuild(cdsl, out_step)
|
||||
|
||||
def test_autonomous_candidate_path_uses_the_cdsl_only_entry_point(self) -> None:
|
||||
source = (Path(__file__).resolve().parents[2] / "backend" / "app" / "services" / "autonomous_cdsl_generation.py").read_text(encoding="utf-8")
|
||||
candidate_builder = source[source.index("def build_candidate"):source.index("def commit_candidate")]
|
||||
self.assertIn("engine.run_cdsl_only(cdsl_copy, step_path)", candidate_builder)
|
||||
self.assertNotIn("engine.run_rebuild(cdsl_copy, step_path)", candidate_builder)
|
||||
|
||||
def test_hole_uses_inverse_host_face_normal_for_a_concave_l_bracket(self) -> None:
|
||||
"""A local top face can be below the global body centre on an L part.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user