We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92f8b40 commit 6e1e44bCopy full SHA for 6e1e44b
tests/graph/test_replace.py
@@ -169,6 +169,17 @@ def test_graph_replace(self):
169
# the old reference is still kept
170
assert oc.owner.inputs[0].owner.inputs[1] is w
171
172
+ def test_non_list_input(self):
173
+ x = MyVariable("x")
174
+ y = MyVariable("y")
175
+ o = MyOp("xyop")(x, y)
176
+ new_x = x.clone(name="x_new")
177
+ new_y = y.clone(name="y2_new")
178
+ # test non list inputs as well
179
+ oc = graph_replace(o, {x: new_x, y: new_y})
180
+ assert oc.owner.inputs[1] is new_y
181
+ assert oc.owner.inputs[0] is new_x
182
+
183
def test_graph_replace_advanced(self):
184
x = MyVariable("x")
185
y = MyVariable("y")
0 commit comments