Repository navigation
Commit b72ac3f
Split the Stage 12 runtime tests into smaller files
tests/test_stage12_runtime.py (4,709 lines) was over the file-length
limit for test code. Its tests move, unchanged, into thirteen files by
behaviour:
- test_stage12_runtime.py: loading a simulation's dataset and region
- test_stage12_dataset_provenance.py: the dataset a calculation loads
- test_stage12_single_worker.py, test_stage12_single_worker_failures.py
- test_stage12_aggregate_reports.py
- test_stage12_coordinator.py, test_stage12_coordinator_failures.py,
test_stage12_coordinator_failure_records.py
- test_stage12_runtime_store_retries.py
- test_stage12_child_cancellation.py, test_stage12_child_state_errors.py
- test_stage12_wait_window.py
The helpers several files use move to three support modules:
stage12_runtime_support.py (inputs, records, runtimes and failure
checks), stage12_fake_stores.py (the in-memory stores) and
stage12_child_call_support.py (fake child calls and invokers). Their
private names are now public, under names that no test uses for a local
variable: for example _report is report_execution_input, _simulation is
simulation_execution_input, _context is invocation_context and _parent
is parent_record. The seven other Stage 12 test modules that imported
them from test_stage12_runtime.py now import them from the support
modules, and coordinate_report_impl from the package itself.
All 1,895 tests keep their names and bodies, apart from the renamed
helpers. Pytest names two parametrized cases of
test_installed_bundle_accepts_the_dataset_a_region_loads after the bundle
helper, so they are now [us-bundle_provenance] and
[state/ut-bundle_provenance].
The file-length baseline drops the file (count 8 to 7).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>1 parent 45c5ed8 commit b72ac3f
26 files changed
Lines changed: 4885 additions & 4510 deletions
File tree
- docs/generated
- projects/policyengine-simulation-executor/tests
- rules
- baselines
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
0 commit comments