Skip to content

Populate or drop the empty benchmark and stress test tiers #86

Description

@tschm

Subcategory: test design quality
Score: 9 → 10

Problem

The test suite is strong — 172 tests, 100% coverage of all 588 statements
against a 90% bar, with behaviour-oriented names (test_plot_reuses_server,
test_plot_block_handles_keyboard_interrupt) and TestPlotResult /
TestServerStatus asserting the documented response contracts rather than
implementation details.

Two tiers, though, are wired up but empty:

  1. tests/benchmarks/ and tests/stress/ do not exist. The make test
    recipe passes --ignore=tests/benchmarks --ignore=tests/stress, and the
    template provides make benchmark and make stress targets — all of which
    currently have nothing to run. The pytest-benchmark plugin is installed and
    emits a PytestBenchmarkWarning on every make test run (16 of them) about
    benchmarks being disabled under xdist, for benchmarks that do not exist.

  2. hypothesis is installed but unused. It ships via the template's
    .rhiza/requirements/tests.txt; no file under tests/ imports it.
    validate_input (src/pycharting/data/ingestion.py:29) is a natural fit —
    its contract is entirely about array-length agreement, type coercion across
    pd.Series / np.ndarray / list, and single-vs-multi-series mode
    selection, which are properties rather than examples.

Neither is a defect in what the suite asserts; both are unclaimed coverage that
the surrounding infrastructure already pays for.

Files to change

  • tests/benchmarks/ and tests/stress/ — add tests, or document their absence
  • tests/pycharting/data/test_ingestion.py — add property-based cases

done when

Either the two directories hold real tests (so make benchmark and make stress
do something), or the repo documents that it deliberately does not use those
tiers — and at least one property-based test exercises validate_input's
length/coercion invariants.

Evidence

$ ls tests/benchmarks tests/stress
ls: tests/benchmarks: No such file or directory
ls: tests/stress: No such file or directory

$ grep -rl hypothesis tests
(no matches)

make test recipe: --ignore=tests/benchmarks --ignore=tests/stress.

Found by /rhiza:quality (full mode, rhiza v0.18.8). All 9 gates passed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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