Skip to content

test: group tests into feature-area subdirs#150

Merged
pratyush618 merged 2 commits into
masterfrom
chore/group-test-subdirs
May 8, 2026
Merged

test: group tests into feature-area subdirs#150
pratyush618 merged 2 commits into
masterfrom
chore/group-test-subdirs

Conversation

@pratyush618
Copy link
Copy Markdown
Collaborator

Summary

Stacked on top of #149. Once #149 lands, the base will be retargeted to master and this PR's diff will read as a pure file-move.

Groups the 52 flat test_*.py files into 7 feature-area subdirs that match the taxonomy already documented in .claude/skills/testing/SKILL.md:

Subdir Theme Files
tests/core/ fundamental queue mechanics 18
tests/worker/ pools, prefork, native async (+ prefork_apps/) 4
tests/resources/ resource DI, interception, proxies, streaming 5
tests/workflows/ workflow DAG tests 9
tests/observability/ events, hooks, webhooks, customization 7
tests/integrations/ Flask/FastAPI/CLI/KEDA 4
tests/dashboard/ dashboard backend endpoints 3

Top-level tests/conftest.py stays — fixtures (queue, run_worker, workflow_worker, poll_until) propagate down via pytest's hierarchical discovery. No __init__.py files at any level.

tests/prefork_apps/ moves to tests/worker/prefork_apps/ so it stays adjacent to test_prefork.py — the test uses Path(__file__).parent to make it importable, which keeps working unchanged.

No CI/config edits needed: testpaths = ["tests"] already covers subdirs, pytest discovers test_*.py recursively, and the path-filter glob tests/** matches.

Test plan

  • uv run python -m pytest tests/ --collect-only — 514 tests collected (same count as before).
  • uv run python -m pytest tests/workflows/ tests/worker/test_prefork.py — 83 passed, 1 skipped (exercises the prefork_apps import path after the move).
  • uv run mypy py_src/taskito/ tests/ --no-incremental — clean.
  • uv run ruff check py_src/ tests/ — clean.
  • CI runs the full suite.

@github-actions github-actions Bot added the tests label May 8, 2026
Base automatically changed from chore/rename-tests-python to master May 8, 2026 05:21
@pratyush618 pratyush618 merged commit aae01a6 into master May 8, 2026
3 checks passed
@pratyush618 pratyush618 deleted the chore/group-test-subdirs branch May 8, 2026 05:24
pratyush618 added a commit that referenced this pull request May 8, 2026
Squash-merge of #150 added the subdir copies without removing the top-level originals, leaving every test file present in two places. Removes the 50 stale top-level files and the duplicate prefork_apps/ directory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant