FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test(alter): name the explicit-context parent something defined nowhere else by dimitri-yatsenko · Pull Request #1645 · datajoint/datajoint-python · GitHub

Repository navigation

Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (1) All 1 file type selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
6 changes: 3 additions & 3 deletions tests/integration/test_alter.py
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
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Loading

Back | FazBrowse Home | New Git URL