diff --git a/data/wiki/guanghan_topology_demo.html b/data/wiki/guanghan_topology_demo.html new file mode 100644 index 0000000..5485683 --- /dev/null +++ b/data/wiki/guanghan_topology_demo.html @@ -0,0 +1,493 @@ + + + + + +广寒基地拓扑结构 · GHC-05 任务后 + + + +
+ + +
+ 结构直连 + 加压走道 + 燃料 / 供电 + 大型折叠散热面板 +
+ +
+ + 广寒基地 GHC-05 任务后拓扑 + 核心舱四向安装四个舱段,南侧经居住舱一号连接电力模块十字结构。 + + + + + + + + + + + + + + + + + + + 居住舱#2 + 核心舱北部安装口 + 4铺位 + 2睡袋 + + + + + 吴刚二号 + Block 2 载人着陆器 + 温室远端接口 + + + + + 温室模块 + 核心舱西部安装口 + 展开宽度 7.4 m + + + + + 广寒核心舱 + 四向安装节点 + 北 / 东 / 南 / 西 + 28.2 t 干重 + + + + + 实验舱 + 核心舱东部安装口 + 3个独立温区 + + + + + 居住舱#1 + 核心舱南部安装口 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 北部模块 + 电力模块存储支架 + 加压走道模块 + + + + + 西部模块 + ISRU · 采矿模块 + 矿石 / 燃料存储 + + + + + 电力模块 + 四向安装节点 + 核电与资源中枢 + + + + + 东部模块 + 核燃料存储 + 离心机模块 + + + + + 南部模块 + 核反应堆 · 30%功率 + + + + + + 冰轮一号 + 电力模块西侧 + 燃料运输 + + + + + 冰轮二号 + 电力模块南侧 + + + + + 冰轮三号 + 电力模块东侧 + Block 2 + + +
+ +

模块与车辆支持详情查看;走道、管线和散热面板仅用于表达拓扑关系。

+
+ + + + diff --git a/tests/test_guanghan_topology_demo.py b/tests/test_guanghan_topology_demo.py index 0c9b58e..27ac135 100644 --- a/tests/test_guanghan_topology_demo.py +++ b/tests/test_guanghan_topology_demo.py @@ -65,11 +65,13 @@ class GuanghanTopologySourceTests(unittest.TestCase): def test_every_clickable_module_has_dimensions_field(self) -> None: for module_id in CLICKABLE_MODULES: - self.assertRegex( + match = re.search( + rf'"{re.escape(module_id)}"\s*:\s*\{{(.*?)\n \}}(?:,|\n)', self.html, - rf'"{re.escape(module_id)}"\s*:\s*\{{.*?dimensions\s*:', - msg=f"{module_id} is missing dimensions", + flags=re.S, ) + self.assertIsNotNone(match, msg=f"{module_id} detail object is missing") + self.assertIn("dimensions:", match.group(1), msg=f"{module_id} is missing dimensions") def test_timeline_contains_only_the_two_real_corridors(self) -> None: for incorrect in (