File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -190,6 +190,8 @@ def walk_model(
190190 expand_fn
191191 A function that returns the next variable(s) to be traversed.
192192 """
193+ warnings .warn ("walk_model will be removed in a future relase of PyMC" , FutureWarning )
194+
193195 if stop_at_vars is None :
194196 stop_at_vars = set ()
195197
Original file line number Diff line number Diff line change @@ -281,21 +281,24 @@ def test_walk_model():
281281
282282 test_graph = pt .exp (e + 1 )
283283
284- res = list (walk_model ((test_graph ,)))
284+ with pytest .warns (FutureWarning ):
285+ res = list (walk_model ((test_graph ,)))
285286 assert a in res
286287 assert b in res
287288 assert c in res
288289 assert d in res
289290 assert e in res
290291
291- res = list (walk_model ((test_graph ,), stop_at_vars = {c }))
292+ with pytest .warns (FutureWarning ):
293+ res = list (walk_model ((test_graph ,), stop_at_vars = {c }))
292294 assert a not in res
293295 assert b not in res
294296 assert c in res
295297 assert d in res
296298 assert e in res
297299
298- res = list (walk_model ((test_graph ,), stop_at_vars = {b }))
300+ with pytest .warns (FutureWarning ):
301+ res = list (walk_model ((test_graph ,), stop_at_vars = {b }))
299302 assert a not in res
300303 assert b in res
301304 assert c in res
You can’t perform that action at this time.
0 commit comments