## Test coverage: sync
Test coverage: sync.py filter/CSL/workspace integration¶
Add tests for _sync_lua_filter, _sync_csl_files, and a lightweight sync_workspace integration test in src/projio/sync.py.
What to test¶
_sync_lua_filter(): copies bundled include.lua to .projio/filters/, detects updates via SHA256. Test: first copy, unchanged skip, updated file, dry_run._sync_csl_files(): copies bundled CSL styles to .projio/render/csl/. Test: first copy, skip, update, dry_run.sync_workspace()integration: scaffold a minimal project withprojio init, then runsync_workspace()and verify: config unchanged, Lua filter copied, no crashes. This is the test that would have caught the missingimport yamlbug.
Where¶
- Source:
src/projio/sync.py:156-195(filter),197-235(CSL),890-1010(sync_workspace) - Tests: add to
tests/test_sync.py
Approach¶
For filter/CSL: use tmp_path with .projio/ dir. Bundled files are read from package data (no mocking needed — they're part of the install).
For sync_workspace: scaffold with projio.init.scaffold() first, then call sync_workspace(). Assert no exceptions, key outputs exist.
Related Notes¶
- issue-arash-20260412-013344-955432.md — Sister issue filed at the same time — both add test coverage to projio core modules (config vs sync)
Batch Result¶
- status: done
- batch queue_id:
fa9ae36ce1aa - session:
bf8a344f-5f23-4791-ab7b-17a624a7fc7f - batch duration: 441.8s