Skip to content

Commit 9c15353

Browse files
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.
1 parent 1f90243 commit 9c15353

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎tests/integration/test_alter.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,12 @@ def test_alter_part_from_another_module(pipeline):
144144

145145
def test_alter_explicit_context(pipeline):
146146
"""An explicit context takes precedence over the declaration context."""
147-
# `Parent` resolves only in the explicit context
147+
# `Upstream` is defined nowhere else, so it resolves only in the explicit context
148148
pipeline.Measurement.definition = """
149-
-> Parent
149+
-> Upstream
150150
---
151151
value : float32
152152
unit = "" : varchar(16)
153153
"""
154-
pipeline.Measurement.alter(prompt=False, context={"Parent": pipeline.Item})
154+
pipeline.Measurement.alter(prompt=False, context={"Upstream": pipeline.Item})
155155
assert pipeline.Measurement.heading.secondary_attributes == ["value", "unit"]

0 commit comments

Comments
 (0)