mirror of
https://github.com/CodeSeeed/sbackup.git
synced 2026-10-05 02:42:58 +08:00
v2.0.0: 多目标备份 + S3云存储 + 完整性校验 + 9语言国际化
feat: v2.0.0 — 多目标备份 + S3云存储 + 审计日志 + 9语言国际化
This commit is contained in:
1 parent
c8c704a9c6
commit
8f2bcdf8fa
89 files changed
+37677
-1387
No files matched your search
@@ -0,0 +1,18 @@
|
||||
"""全局测试配置:确保工作目录始终有效"""
|
||||
|
||||
import os
|
||||
import tempfile
|
||||
import pytest
|
||||
|
||||
# 启动时保存一个安全的工作目录
|
||||
_SAFE_CWD = os.getcwd()
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _restore_cwd():
|
||||
"""每个测试前后确保 cwd 有效"""
|
||||
yield
|
||||
try:
|
||||
os.getcwd()
|
||||
except FileNotFoundError:
|
||||
os.chdir(_SAFE_CWD)
|
||||
Reference in new issue
Block a user