Repository navigation
test(alter): name the explicit-context parent something defined nowhere else - #1645
Draft
dimitri-yatsenko wants to merge 1 commit into
Draft
dimitri-yatsenko wants to merge 1 commit into
dimitri-yatsenko wants to merge 1 commit into
Conversation
…re 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.
dimitri-yatsenko
requested review from
MilagrosMarin,
lum-agilyti and
ttngu207
October 21, 2026 15:29
MilagrosMarin
approved these changes
Oct 21, 2026
MilagrosMarin
left a comment
Contributor
There was a problem hiding this comment.
LGTM. Upstream is defined neither in test_alter.py nor in the generated pipeline module, so it can only resolve through the explicit context, and the comment now holds.
Two tiny, non-blocking notes:
- "Defined nowhere else" is slightly broad: other test modules (
test_cascade_delete.py,test_dependencies.py,test_trace.py, …) define anUpstream. None of them is in scope here, so "defined in neither this module nor the pipeline module" would be exact. - The docstring says the explicit context "takes precedence over the declaration context". With a name only the explicit context defines, the test shows that the context is used, not that it wins a conflict. Mapping a name the pipeline module also defines (e.g.
Item) to a different table would test precedence itself, maybe as a follow-up; the previous version didn't test it either.
dimitri-yatsenko
marked this pull request as draft
October 21, 2026 16:46
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review follow-up to #1617, from @MilagrosMarin's note.
test_alter_explicit_contextsaidParentresolves only in the explicit context, but the test module importsParent, so it resolves in the caller's namespace too. The test still told the two apart, but its comment did not hold. The reference is nowUpstream, which nothing else defines, so it can resolve only through the explicit context. The alter tests pass (8).