@@ -357,10 +357,10 @@ def test_node_props_based_prune():
357357 # assert netop(**inp)["sum"] == 6
358358
359359 pred = lambda n , d : d .get ("color" , None ) != "red"
360- assert netop .narrow (predicate = pred )(** inp )["sum" ] == 5
360+ assert netop .narrowed (predicate = pred )(** inp )["sum" ] == 5
361361
362362 pred = lambda n , d : "color" not in d
363- assert netop .narrow (predicate = pred )(** inp )["sum" ] == 3
363+ assert netop .narrowed (predicate = pred )(** inp )["sum" ] == 3
364364
365365
366366def test_input_based_pruning ():
@@ -412,8 +412,8 @@ def test_deps_pruning_vs_narrowing(samplenet):
412412 assert "sum3" in results
413413 assert results ["sum3" ] == add (c , sum2 )
414414
415- # Compare with both `narrow ()`.
416- net = samplenet .narrow (inputs = ["c" , "sum2" ], outputs = ["sum3" ])
415+ # Compare with both `narrowed ()`.
416+ net = samplenet .narrowed (inputs = ["c" , "sum2" ], outputs = ["sum3" ])
417417 results = net (c = c , sum2 = sum2 )
418418
419419 # Make sure we got expected result without having to pass a, b, or d.
@@ -645,7 +645,7 @@ def test_same_outputs_operations_order():
645645
646646 inp = {"a" : 3 , "b" : 1 }
647647 assert addsub (** inp ) == {"a" : 3 , "b" : 1 , "ab" : 4 , "AB" : 4 }
648- assert addsub .narrow (outputs = "AB" )(** inp ) == {"AB" : 4 }
648+ assert addsub .narrowed (outputs = "AB" )(** inp ) == {"AB" : 4 }
649649 assert subadd (** inp ) == {"a" : 3 , "b" : 1 , "ab" : 2 , "AB" : 2 }
650650 assert subadd .compute (inp , "AB" ) == {"AB" : 2 }
651651
@@ -678,7 +678,7 @@ def test_unsatisfied_operations():
678678 exp = {"a" : 10 , "b1" : 2 , "a+b1" : 12 }
679679 assert pipeline (** {"a" : 10 , "b1" : 2 }) == exp
680680 assert pipeline .compute ({"a" : 10 , "b1" : 2 }, ["a+b1" ]) == filtdict (exp , "a+b1" )
681- assert pipeline .narrow (outputs = ["a+b1" ])(** {"a" : 10 , "b1" : 2 }) == filtdict (
681+ assert pipeline .narrowed (outputs = ["a+b1" ])(** {"a" : 10 , "b1" : 2 }) == filtdict (
682682 exp , "a+b1"
683683 )
684684
0 commit comments