Skip to content

Commit e7264e2

Browse files
committed
include value coord in test
1 parent b859845 commit e7264e2

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

tests/sampling/test_forward.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1672,13 +1672,16 @@ def test_Triangular(
16721672

16731673
def test_get_constant_coords():
16741674
with pm.Model() as model:
1675-
model.add_coord("coord0", length=1)
1675+
model.add_coord("length_coord", length=1)
1676+
model.add_coord("value_coord", values=(3,))
16761677

1677-
trace_coords_same_len = {"coord0": np.array([0])}
1678-
assert "coord0" in get_constant_coords(trace_coords_same_len, model)
1678+
trace_coords_same = {"length_coord": np.array([0]), "value_coord": np.array([3])}
1679+
constant_coords_same = get_constant_coords(trace_coords_same, model)
1680+
assert constant_coords_same == {"length_coord", "value_coord"}
16791681

1680-
trace_coords_diff_len = {"coord0": np.array([0, 1])}
1681-
assert "coord0" not in get_constant_coords(trace_coords_diff_len, model)
1682+
trace_coords_diff = {"length_coord": np.array([0, 1]), "value_coord": np.array([4])}
1683+
constant_coords_diff = get_constant_coords(trace_coords_diff, model)
1684+
assert constant_coords_diff == set()
16821685

16831686

16841687
def test_get_vars_in_point_list():

0 commit comments

Comments
 (0)