Skip to content

Commit b263ef0

Browse files
committed
update test_eval for unused_input
1 parent 827d72d commit b263ef0

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/graph/test_basic.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -365,15 +365,15 @@ def test_eval_with_strings_no_match(self):
365365
def test_eval_kwargs(self):
366366
with pytest.raises(UnusedInputError):
367367
self.w.eval({self.z: 3, self.x: 2.5})
368+
assert self.w.eval({self.z: 3, self.x: 2.5}, on_unused_input="ignore") == 6.0
369+
370+
# regression tests for https://github.com/pymc-devs/pytensor/issues/1084
371+
q = self.x + 1
368372
with pytest.warns(
369373
UserWarning,
370374
match="pytensor.function was asked to create a function",
371375
):
372-
self.w.eval({self.z: 3, self.x: 2.5}, on_unused_input="warn")
373-
assert self.w.eval({self.z: 3, self.x: 2.5}, on_unused_input="ignore") == 6.0
374-
375-
# regression test for https://github.com/pymc-devs/pytensor/issues/1084
376-
q = self.x + 1
376+
assert q.eval({"x": 1, "y": 2}, on_unused_input="warn") == 2.0
377377
assert q.eval({"x": 1, "y": 2}, on_unused_input="ignore") == 2.0
378378

379379
@pytest.mark.filterwarnings("error")

0 commit comments

Comments
 (0)