feat: 移除全量包中的小区数据
This commit is contained in:
+13
-15
@@ -567,21 +567,19 @@ class QgisProjectTest(unittest.TestCase):
|
||||
|
||||
def test_market_and_summary_projects_have_no_user_count_layer(self):
|
||||
with tempfile.TemporaryDirectory() as temp_dir:
|
||||
for include_cell_data in (False, True):
|
||||
with self.subTest(include_cell_data=include_cell_data):
|
||||
output = Path(temp_dir) / f"GIS-{include_cell_data}.qgz"
|
||||
qgis.copy_gis_project_to_market(
|
||||
config.GIS_PROJECT_SOURCE, output,
|
||||
models.MarketFeature(1, "1-test", "test", box(0, 0, 1, 1)),
|
||||
None, include_cell_data=include_cell_data,
|
||||
)
|
||||
with zipfile.ZipFile(output) as archive:
|
||||
xml = archive.read("GIS.qgs")
|
||||
self.assertNotIn(config.USER_COUNT_OUTPUT_FILENAME, xml.decode("utf-8"))
|
||||
names = [item.get("name") for item in ET.fromstring(xml).iter("layer-tree-layer")]
|
||||
self.assertEqual("CellData" in names, include_cell_data)
|
||||
self.assertIn(Path(config.COMPETITOR_SIGNAL_OUTPUT_FILENAME).stem, names)
|
||||
self.assertEqual(names[-2:], ["GoogleCN", "必应地图"])
|
||||
output = Path(temp_dir) / "GIS.qgz"
|
||||
qgis.copy_gis_project_to_market(
|
||||
config.GIS_PROJECT_SOURCE, output,
|
||||
models.MarketFeature(1, "1-test", "test", box(0, 0, 1, 1)),
|
||||
None, include_cell_data=True,
|
||||
)
|
||||
with zipfile.ZipFile(output) as archive:
|
||||
xml = archive.read("GIS.qgs")
|
||||
self.assertNotIn(config.USER_COUNT_OUTPUT_FILENAME, xml.decode("utf-8"))
|
||||
names = [item.get("name") for item in ET.fromstring(xml).iter("layer-tree-layer")]
|
||||
self.assertNotIn("CellData", names)
|
||||
self.assertIn(Path(config.COMPETITOR_SIGNAL_OUTPUT_FILENAME).stem, names)
|
||||
self.assertEqual(names[-2:], ["GoogleCN", "必应地图"])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -175,7 +175,6 @@ class TaskIntegrationTest(unittest.TestCase):
|
||||
[(1, a, ["甲", "a", "甲AOI"]), (2, b, ["乙", "b", "乙AOI"])])
|
||||
params = {"MARKET_GPKG": str(self.root / "markets.gpkg"), "GRID_5G_GPKG": str(self.root / "grid.gpkg"),
|
||||
"BUILDING_INFO_GPKG": str(self.root / "buildings.gpkg"), "AOI_GPKG": str(self.root / "aoi.gpkg"),
|
||||
"CELL_DATA_GPKG": str(self.root / "buildings.gpkg"),
|
||||
"GIS_PROJECT_SOURCE": str(tasks.ROOT / "source/GIS.qgz"), "MAX_WORKERS": 2,
|
||||
"SCALE": 1, "MAX_RASTER_PIXELS": 64, "SUMMARY_MAX_RASTER_PIXELS": 64,
|
||||
"SUMMARY_OUTPUT_ENABLED": True, "SELECTED_MARKET_IDS": [31, 42]}
|
||||
|
||||
Reference in New Issue
Block a user