From 499ed903fae0202662940bf84ce772f0137df483 Mon Sep 17 00:00:00 2001 From: AFFAANh Date: Wed, 2 Sep 2026 19:00:22 +0530 Subject: [PATCH] chore(tests): move pytest's cache directory out of OneDrive's way MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every test run this session logged the same warning: "PytestCacheWarning: could not create cache path ...\.pytest_cache\v\cache\nodeids: [WinError 5] Access is denied." The project lives under OneDrive on this machine, and OneDrive's sync agent transiently locks files it's syncing — a classic source of WinError 5 on Windows, and not something specific to this one laptop's permissions. `npm run test` now points pytest at .pytest-temp/.pytest-cache instead of the default .pytest_cache, both gitignored. Harmless either way: it's cache, not state. Co-Authored-By: Claude Opus 5 --- .gitignore | 2 ++ package.json | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2c0ef2b..c3fd5bf 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,8 @@ __pycache__/ *.py[cod] *.egg-info/ .pytest_cache/ +.pytest-temp/ +.pytest-cache/ .ruff_cache/ .mypy_cache/ .coverage diff --git a/package.json b/package.json index a896861..f7497ba 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "dev:import-json": "dotenv -e .env.development -- node scripts/run-python.cjs -m adclaw db import-json", "dev:seed:undo": "dotenv -e .env.development -- node scripts/run-python.cjs -m adclaw db seed-undo", "dev:reset": "npm run dev:migrate:undo:all && npm run dev:migrate && npm run dev:seed", - "test": "dotenv -e .env.testing -- node scripts/run-python.cjs -m pytest", + "test": "dotenv -e .env.testing -- node scripts/run-python.cjs -m pytest --basetemp=.pytest-temp -o cache_dir=.pytest-cache", "test:serve": "dotenv -e .env.testing -- node scripts/run-python.cjs -m adclaw app --host 127.0.0.1 --port 8089", "test:migrate": "dotenv -e .env.testing -- node scripts/run-python.cjs -m adclaw db migrate", "test:seed": "dotenv -e .env.testing -- node scripts/run-python.cjs -m adclaw db seed",