chore(tests): move pytest's cache directory out of OneDrive's way

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 <noreply@anthropic.com>
This commit is contained in:
AFFAANh
2026-09-02 19:00:22 +05:30
co-authored by Claude Opus 5
parent 876b3150d5
commit 499ed903fa
2 changed files with 3 additions and 1 deletions
+2
View File
@@ -5,6 +5,8 @@ __pycache__/
*.py[cod] *.py[cod]
*.egg-info/ *.egg-info/
.pytest_cache/ .pytest_cache/
.pytest-temp/
.pytest-cache/
.ruff_cache/ .ruff_cache/
.mypy_cache/ .mypy_cache/
.coverage .coverage
+1 -1
View File
@@ -22,7 +22,7 @@
"dev:import-json": "dotenv -e .env.development -- node scripts/run-python.cjs -m adclaw db import-json", "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: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", "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: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: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", "test:seed": "dotenv -e .env.testing -- node scripts/run-python.cjs -m adclaw db seed",