Repository navigation
Open
Labels
housekeepingRepo hygieneRepo hygiene
Description
Context
Backend test organisation follow-up from closed PR #41.
PR #41 (23 days old, Draft) proposed reorganising tests/ into six category folders: unit/, system/, system_integration/, performance/, accessibility/, uat/. It also added shared fixtures in tests/conftest.py (live_api, registry_cleanup, te_org_cleanup, destructive_enabled) and new Makefile targets (test-unit, test-system, test-sit, test-performance, test-accessibility, test-uat).
The reorganisation is still valuable — the current flat tests/*.py layout makes it hard to run just one category, and the new M2/M3 tests have landed in the flat folder with no categorisation.
Scope
- Move existing
tests/*.pyinto category folders (same renames Group tests into unit, system, SIT, performance, accessibility and UAT #41 proposed) - Create
tests/conftest.pywith the four shared fixtures - Add Makefile targets for each category
- Update
pytest.iniwith the new markers (system,sit,performance,accessibility,uat) - Update
scripts/lint.shPY_TESTS list to the new paths plus the 9 M2/M3/preflight tests that landed after Group tests into unit, system, SIT, performance, accessibility and UAT #41 was drafted (test_api_hardening.py,test_evals_tier_e_x.py,test_migrations.py,test_import_counts.py,test_accounts.py,test_tenant_isolation.py,test_roles.py,test_oidc.py,test_preflight_ps1.py) - Update
requirements-dev.txtwithplaywrightandaxe-playwright-python(needed by #B below)
Out of scope
- Frontend test reorganisation under
csv-table-hub-main/src/__tests__/unit/(that code is from Lovable, see Live pointers to superseded docs/API_INTEGRATION.md need to be resolved #164 and STARTER_GUIDE.md walkthrough skips sign-in step (Milestone 2 landed after PR #63 was drafted) #166 for context; a Streamlit spike Spike: rebuild M4 review screen in Streamlit (1-day time-box) #154 is active) - The new test files Group tests into unit, system, SIT, performance, accessibility and UAT #41 added (
test_system_api.py,test_sit_frontend_contract.py,test_performance.py,test_uat_user_stories.py,test_config_auth.py,test_csv_parse.py,test_db_pool.py) — those become smaller follow-ups once the structure is in place
Done when
tests/has the six category folders, each with an__init__.pyand the moved filesmake test-unit,make test-systemetc work locallypython -m pytest tests/ -qstill passes with the same test countscripts/lint.shlists every Python test file in the repo
Related
- Group tests into unit, system, SIT, performance, accessibility and UAT #41 (closed, superseded by this + #B + #C)
- #B: Accessibility CI job
- #C: Test catalogue generator
- Live pointers to superseded docs/API_INTEGRATION.md need to be resolved #164, STARTER_GUIDE.md walkthrough skips sign-in step (Milestone 2 landed after PR #63 was drafted) #166: STARTER_GUIDE pointer fixes (independent)
- Spike: rebuild M4 review screen in Streamlit (1-day time-box) #154: Streamlit spike (may change the frontend-test picture)
Metadata
Metadata
Assignees
Labels
housekeepingRepo hygieneRepo hygiene
Activity