File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 110110def __getattr__ (name ):
111111 if name == "MaxAndArgmax" :
112112 raise AttributeError (
113- "The class `MaxAndArgmax` has been deprecated. "
114- "Call `Max` and `Argmax` separately as an alternative."
113+ "The class `MaxandArgmax` has been deprecated. Call `Max` and `Argmax` seperately as an alternative."
115114 )
115+ raise AttributeError (f"module { __name__ !r} has no attribute { name !r} " )
116116
117117
118118def _get_atol_rtol (a , b ):
Original file line number Diff line number Diff line change @@ -1423,7 +1423,10 @@ def test_bool(self):
14231423
14241424
14251425def test_MaxAndArgmax_deprecated ():
1426- with pytest .raises (AttributeError ):
1426+ with pytest .raises (
1427+ AttributeError ,
1428+ match = "The class `MaxandArgmax` has been deprecated. Call `Max` and `Argmax` seperately as an alternative." ,
1429+ ):
14271430 pytensor .tensor .math .MaxAndArgmax
14281431
14291432
You can’t perform that action at this time.
0 commit comments