File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -29,14 +29,15 @@ def test_constructor(self, which):
2929 c (win_type = "boxcar" , window = 2 , min_periods = 1 , center = False )
3030
3131 # not valid
32+ msg = "|" .join (["min_periods must be an integer" , "center must be a boolean" ])
3233 for w in [2.0 , "foo" , np .array ([2 ])]:
33- with pytest .raises (ValueError ):
34+ with pytest .raises (ValueError , match = msg ):
3435 c (win_type = "boxcar" , window = 2 , min_periods = w )
35- with pytest .raises (ValueError ):
36+ with pytest .raises (ValueError , match = msg ):
3637 c (win_type = "boxcar" , window = 2 , min_periods = 1 , center = w )
3738
3839 for wt in ["foobar" , 1 ]:
39- with pytest .raises (ValueError ):
40+ with pytest .raises (ValueError , match = "Invalid win_type" ):
4041 c (win_type = wt , window = 2 )
4142
4243 @td .skip_if_no_scipy
You can’t perform that action at this time.
0 commit comments