fix(tests): remove unused mock_tmp variable and apply ruff formatting
CI / lint (pull_request) Successful in 56s
CI / quality (pull_request) Successful in 57s
CI / typecheck (pull_request) Successful in 59s
CI / security (pull_request) Successful in 1m23s
CI / push-validation (pull_request) Successful in 26s
CI / build (pull_request) Successful in 36s
CI / helm (pull_request) Successful in 42s
CI / unit_tests (pull_request) Successful in 5m31s
CI / docker (pull_request) Successful in 1m38s
CI / integration_tests (pull_request) Successful in 8m42s
CI / coverage (pull_request) Successful in 9m15s
CI / status-check (pull_request) Successful in 3s
CI / lint (pull_request) Successful in 56s
CI / quality (pull_request) Successful in 57s
CI / typecheck (pull_request) Successful in 59s
CI / security (pull_request) Successful in 1m23s
CI / push-validation (pull_request) Successful in 26s
CI / build (pull_request) Successful in 36s
CI / helm (pull_request) Successful in 42s
CI / unit_tests (pull_request) Successful in 5m31s
CI / docker (pull_request) Successful in 1m38s
CI / integration_tests (pull_request) Successful in 8m42s
CI / coverage (pull_request) Successful in 9m15s
CI / status-check (pull_request) Successful in 3s
This commit is contained in:
@@ -438,7 +438,7 @@ def step_cleanup_cov_purge_sandboxes_cache_tracking(context: Context) -> None:
|
||||
|
||||
# Create temporary stub directories that look like sandbox dirs
|
||||
tmp_dir = tempfile.mkdtemp()
|
||||
sandbox_names = [f"ca-sandbox-plan{ i}-stub{i}" for i in range(2)]
|
||||
sandbox_names = [f"ca-sandbox-plan{i}-stub{i}" for i in range(2)]
|
||||
sandbox_paths = []
|
||||
for name in sandbox_names:
|
||||
p = Path(tmp_dir) / name
|
||||
@@ -483,9 +483,7 @@ def step_cleanup_cov_purge_empty_cache(context: Context) -> None:
|
||||
tempfile.gettempdir = fake_gettempdir
|
||||
# Patch Path.exists to return False so we hit the early-return path but
|
||||
# still want to verify cache is set to None
|
||||
with patch(
|
||||
"cleveragents.application.services.cleanup_service.tempfile"
|
||||
) as mock_tmp:
|
||||
with patch("cleveragents.application.services.cleanup_service.tempfile"):
|
||||
# tempfile module was already imported in cleanup_service.py,
|
||||
# but we patched gettempdir directly above
|
||||
|
||||
|
||||
Reference in New Issue
Block a user