feat: 试用过程中的细节优化

This commit is contained in:
2026-09-13 22:19:16 +08:00
parent dbb2bb80bd
commit 897e5585c0
40 changed files with 1156 additions and 257 deletions
+22
View File
@@ -0,0 +1,22 @@
"""平台目标比例到供应商尺寸参数的映射。"""
from __future__ import annotations
import sys
import unittest
from pathlib import Path
SERVER_DIR = Path(__file__).resolve().parents[1]
if str(SERVER_DIR) not in sys.path:
sys.path.insert(0, str(SERVER_DIR))
from services.generator import _image_size
class ImageSizeTests(unittest.TestCase):
def test_pcore_ozon_size_is_exactly_three_to_four(self) -> None:
width, height = map(int, _image_size("pcore", "3:4").split("x"))
self.assertEqual(width * 4, height * 3)
if __name__ == "__main__":
unittest.main()