From 9c1535397d16e70e43e3ebca0619641cdeae4232 Mon Sep 17 00:00:00 2001 From: Dimitri Yatsenko Date: Wed, 21 Oct 2026 10:28:49 -0500 Subject: [PATCH] test(alter): name the explicit-context parent something defined nowhere else Review follow-up to #1617. test_alter_explicit_context said `Parent` resolves only in the explicit context, but the test module imports `Parent`, so it resolves in the caller's namespace too. The reference is now `Upstream`, which nothing else defines, so the comment holds. --- tests/integration/test_alter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/test_alter.py b/tests/integration/test_alter.py index 8af58e2bb..c593dc30a 100644 --- a/tests/integration/test_alter.py +++ b/tests/integration/test_alter.py @@ -144,12 +144,12 @@ def test_alter_part_from_another_module(pipeline): def test_alter_explicit_context(pipeline): """An explicit context takes precedence over the declaration context.""" - # `Parent` resolves only in the explicit context + # `Upstream` is defined nowhere else, so it resolves only in the explicit context pipeline.Measurement.definition = """ - -> Parent + -> Upstream --- value : float32 unit = "" : varchar(16) """ - pipeline.Measurement.alter(prompt=False, context={"Parent": pipeline.Item}) + pipeline.Measurement.alter(prompt=False, context={"Upstream": pipeline.Item}) assert pipeline.Measurement.heading.secondary_attributes == ["value", "unit"]