diff --git a/tests/validation/run_refined_dfg.py b/tests/validation/run_refined_dfg.py index 3e0eeb7..5038f84 100644 --- a/tests/validation/run_refined_dfg.py +++ b/tests/validation/run_refined_dfg.py @@ -270,10 +270,14 @@ def host_geometry(source, h, collision="SRT", jet_scenario="none", placement="wi pair = FixedPatch2D.from_config(cfg, PLACEMENTS[placement]) layout = BlockLayout2D.build(cfg.ny, cfg.nx, *BASE_BLOCK) validate_channel_config(cfg, [BASE_BLOCK, FINE_BLOCK]) - # Historical pinned source (jet_scenario none) names it blocked_base_tables; - # the current checkout (public Jet scenarios) names it blocked_coarse_tables. - coarse_tables = (refinement_tables.blocked_base_tables if jet_scenario == "none" - else refinement_tables.blocked_coarse_tables) + # Select by the imported source's own API, not by scenario: the pinned historical + # source (verify_source) defines blocked_base_tables, the current checkout (host + # tests, public Jet scenarios) blocked_coarse_tables. Exactly one must exist. + names = [n for n in ("blocked_base_tables", "blocked_coarse_tables") + if hasattr(refinement_tables, n)] + if len(names) != 1: + raise RuntimeError(f"Unexpected coarse transfer table API: {names}") + coarse_tables = getattr(refinement_tables, names[0]) targets = coarse_tables(pair, layout, np.argsort(pair.coalesce_coarse))[1] validate_channel_transfers(pair, layout, targets) BlockLayout2D.build(*pair.fine_shape, *FINE_BLOCK, periodic=(False, False))