# -*- coding: utf-8 -*- """票 04:备份 e2e-core 原始报告(防 F11/F12 部分回归运行覆盖)。""" import io, sys, shutil, os sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') d = r'e:\code\crm-backend-matt\.scratch\opportunity-e2e' for name in ('report-core.md', 'e2e-core-result.json'): src = os.path.join(d, name) if os.path.exists(src): dst = os.path.join(d, name + '.bak-pre-t04') shutil.copy2(src, dst) print(f'backed up {name} -> {name}.bak-pre-t04 ({os.path.getsize(src)} bytes)') else: print(f'{name} 不存在(跳过)')