Skip to content

fix: test_parse_no_run_reasons expects stale GetDist key #56

Description

@Jammy2211

Overview

tests/test_result_collector.py::test_parse_no_run_reasons has been broken on
main since commit e72a077 ("Rename per-sampler plotter stems to
snake_case") renamed the GetDist entry in autobuild/config/no_run.yaml to
get_dist. The test still asserts the old CamelCase key. Running pytest tests/ locally or in CI fails on that assertion.

Plan

  • Update the test assertions to expect the snake_case key get_dist that the
    YAML actually contains.
  • No change to production code or YAML — the rename was intentional; only the
    test assertion lagged behind.
  • Verify by running the full test suite with no deselects.
Detailed implementation plan

Affected Repositories

  • PyAutoBuild (primary)

Work Classification

Library (build-infrastructure test fix)

Branch Survey

Repository Current Branch Dirty?
./PyAutoBuild main clean

Suggested branch: feature/test-no-run-reasons-fix
Worktree root: ~/Code/PyAutoLabs-wt/test-no-run-reasons-fix/ (created later by /start_library)

Implementation Steps

  1. In PyAutoBuild/tests/test_result_collector.py replace lines 106-107:

    assert "GetDist" in reasons
    assert "install" in reasons["GetDist"].lower()

    with:

    assert "get_dist" in reasons
    assert "install" in reasons["get_dist"].lower()
  2. Run pytest tests/ — expect all 40 tests to pass with no deselects.

Key Files

  • tests/test_result_collector.py — two-line assertion rename

Original Prompt

Click to expand starting prompt

Fix the pre-existing test_parse_no_run_reasons test failure in PyAutoBuild.
Commit e72a077 renamed GetDistget_dist in autobuild/config/no_run.yaml
but the test at tests/test_result_collector.py:106-107 still asserts the old
CamelCase key. Surfaced while shipping PR #55 (HowToFit build-target
registration) where it had to be deselected. Update the test to expect
get_dist. No YAML change; rename was intentional.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions