Skip to content

Commit 446557c

Browse files
committed
Demonstrate issue 3793.
1 parent 74b7788 commit 446557c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pymc3/tests/test_data_container.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,12 @@ def test_model_to_graphviz_for_model_with_data_container(self):
143143
assert text in g.source
144144
text = 'obs [label="obs ~ Normal" style=filled]'
145145
assert text in g.source
146+
147+
# this is a test for issue 3793 -- `Data` objects in named models are
148+
# not given model-relative names.
149+
def test_data_naming():
150+
with pm.Model("named_model") as model:
151+
x = pm.Data("x", [1.0, 2.0, 3.0])
152+
y = pm.Normal("y")
153+
assert y.name == "named_model_y"
154+
assert x.name == "named_model_x"

0 commit comments

Comments
 (0)