Skip to content

Fix test layout parity: orphan flat tests + missing mirrored modules + duplicate suite #55

Description

@tschm

Subcategory: Test layout parity (rhiza check_test_layout.py)
Current score: 3/10 → Target: 10/10

Problem

check_test_layout.py fails — the suite is a half-finished migration to the mirrored tests/<pkg>/** layout, leaving orphans, gaps, and a duplicated test module.

Missing mirrored test files:

  • tests/pycharting/api/test_interface.py (for src/pycharting/api/interface.py)
  • tests/pycharting/api/test_routes.py (for src/pycharting/api/routes.py)
  • tests/pycharting/core/test_lifecycle.py (for src/pycharting/core/lifecycle.py)
  • tests/pycharting/core/test_server.py (for src/pycharting/core/server.py)

Orphan flat test files (no matching src/* module):

  • tests/test_api_routes.py, tests/test_data_ingestion.py, tests/test_data_slicing.py, tests/test_import.py, tests/test_interface.py, tests/test_lifecycle.py, tests/test_server.py

Duplicate execution: tests/test_data_ingestion.py (513 lines) and tests/pycharting/data/test_ingestion.py (781 lines) both cover data/ingestion.py and both run — wasteful and confusing.

Fix

Consolidate every flat test into the mirrored layout under tests/pycharting/** (merging the richer mirrored ingestion file, dropping the stale flat duplicate), so each src/pycharting/<mod>.py has exactly one tests/pycharting/<mod>/test_*.py (or matching name).

Done when

  • python3 <rhiza>/scripts/check_test_layout.py exits 0 ("tests mirror sources 1:1") and no module is tested by two files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions