From 984c7238727da10ffc803025c381a98da8bfe763 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Mon, 5 Jan 2026 19:36:22 +0800 Subject: [PATCH] Update 922_py_compile.py --- tests/922_py_compile.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/922_py_compile.py b/tests/922_py_compile.py index c83fddc8..522d5cf8 100644 --- a/tests/922_py_compile.py +++ b/tests/922_py_compile.py @@ -4,7 +4,12 @@ except ImportError: print('os is not enabled, skipping test...') exit(0) -assert os.system('./main --compile python/heapq.py heapq1.pyc') == 0 +import sys +if sys.platform == 'win32': + exe_name = 'main.exe' +else: + exe_name = './main' +assert os.system(f'{exe_name} --compile python/heapq.py heapq1.pyc') == 0 assert os.path.exists('heapq1.pyc') import heapq1