8000 test: split the grower journey tests into modules that each run in under five minutes by rafatahmed · Pull Request #398 · rafatahmed/Flahax · GitHub
[go: up one dir, main page]

Skip to content
< 8000 div class="prc-PageLayout-VerticalDivider-9QRmK prc-PageLayout-SidebarVerticalDivider-0Rl0V" data-component="PageLayout.VerticalDivider" data-variant="line" data-position="end" style="--spacing:var(--spacing-none)">

test: split the grower journey tests into modules that each run in under five minutes - #398

Merged
rafatahmed merged 1 commit into
mainfrom
refactor/split-grower-journey-tests
Nov 30, 2026
Merged

rafatahmed merged 1 commit into
mainfrom
refactor/split-grower-journey-tests

Conversation

@rafatahmed
Copy link
Copy Markdown
Owner

NOT READY until CI is green.

Closes #397

The 42 tests of tests/test_grower_journey.py (359 s alone) are split by class into modules that each run alone in under five minutes. No test is added, removed or changed; only the module name in each test id changes.

Module Tests
test_grower_journey_catalogue_even 8 (formulas at even positions, plus the inventory guard)
test_grower_journey_catalogue_odd 6 (formulas at odd positions)
test_grower_journey_reagents 12
test_grower_journey_reports 16
grower_journey_support shared tomato, check_grower_outputs, CatalogueFormulaChecks

The catalogue is split by formula position so a formula added later is covered without edits. tests/test_ci_parallel.py and tools/ci_test_weights.json follow the new modules.

Verified on this branch:

  • The set of test ids is identical before and after (42 = 8 + 6 + 12 + 16); the original module is kept in outputs/test-runs/2026-11-30-refactor-split-grower-journey/.
  • Each module alone, one at a time, all pass: 208 s, 275 s, 163 s, 189 s (machine load varied about 4x between runs, so treat these as upper bounds); test_ci_parallel 3 s.
  • Lint passes.

Not yet verified: the CI exact-coverage and 3.11 gates have not run.

…der five minutes

The 42 tests of test_grower_journey are now in four modules (catalogue even and odd positions, reagents, reports) with the shared helpers in grower_journey_support. The test identities are unchanged apart from the module name. CI weights and the catalogue scheduling test follow the new modules.
@rafatahmed rafatahmed added the enhancement New feature or request label Nov 30, 2026
@rafatahmed rafatahmed self-assigned this Nov 30, 2026
@codecov
codecov Bot commented Nov 30, 2026 •
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (8ff1c14) to head (4292afe).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #398   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          152       152           
  Lines        18111     18111           
  Branches      3657      3657           
=========================================
  Hits         18111     18111           
Flag Coverage Δ
unittests 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@rafatahmed
rafatahmed marked this pull request as ready for review November 30, 2026 11:07
@rafatahmed
rafatahmed merged commit c91b0d2 into main Nov 30, 2026
29 checks passed
@rafatahmed
rafatahmed deleted the refactor/split-grower-journey-test 7CB0 s branch November 30, 2026 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Split test_grower_journey into modules that each run in under five minutes

1 participant

0