import unittest from terrarium.map_visualization import MAP_TOPOLOGY_PREVIEW_SCHEMA_VERSION, large_world_topology_preview class MapVisualizationTest(unittest.TestCase): def test_large_world_topology_preview_is_bounded_and_inspectable(self): preview = large_world_topology_preview(seed=909, profile="cover_maze", radius=8, tick=4) self.assertEqual(preview["schema_version"], MAP_TOPOLOGY_PREVIEW_SCHEMA_VERSION) self.assertEqual(preview["profile"], "cover_maze") self.assertEqual(len(preview["viewport_ascii"]), 17) self.assertTrue(all(len(row) == 17 for row in preview["viewport_ascii"])) self.assertIn("@", "".join(preview["viewport_ascii"])) self.assertGreater(preview["region_graph_summary"]["node_count"], 0) self.assertGreater(preview["complexity_metrics"]["semantic_object_count"], 0) self.assertTrue(preview["anti_gaming"]["human_audit_preview_only"]) self.assertFalse(preview["anti_gaming"]["whole_map_policy_input"]) if __name__ == "__main__": unittest.main()