From a1e246e1b4f9b5b447e1ea8bd493e2ab3b0b7a5b Mon Sep 17 00:00:00 2001 From: Azide Date: Wed, 6 Jul 2022 21:07:07 +0800 Subject: [PATCH] =?UTF-8?q?test(fix):=E4=B8=BA=E4=B8=8D=E5=90=8C=E7=9A=84?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=BF=94=E5=9B=9E=E4=B8=8D=E5=90=8C=E7=9A=84?= =?UTF-8?q?hash?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_custom_post.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/test_custom_post.py b/tests/test_custom_post.py index 4b7b452..4df3a03 100644 --- a/tests/test_custom_post.py +++ b/tests/test_custom_post.py @@ -1,5 +1,7 @@ import base64 import hashlib +import platform +from io import UnsupportedOperation from pathlib import Path import pytest @@ -27,7 +29,15 @@ def ms_list(): @pytest.fixture def pic_hash(): - return "58723fdc24b473b6dbd8ec8cbc3b7e46160c83df" + platform_name = platform.system() + if platform_name == "Windows": + return "58723fdc24b473b6dbd8ec8cbc3b7e46160c83df" + elif platform_name == "Linux": + return "4d540798108762df76de34f7bdbc667dada6b5cb" + elif platform_name == "Darwin": + return "a482bf8317d56e5ddc71437584343ace29ff545c" + else: + raise UnsupportedOperation(f"未支持的平台{platform_name}") @pytest.fixture