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):
29
29
c (win_type = "boxcar" , window = 2 , min_periods = 1 , center = False )
30
30
31
31
# not valid
32
+ msg = "|" .join (["min_periods must be an integer" , "center must be a boolean" ])
32
33
for w in [2.0 , "foo" , np .array ([2 ])]:
33
- with pytest .raises (ValueError ):
34
+ with pytest .raises (ValueError , match = msg ):
34
35
c (win_type = "boxcar" , window = 2 , min_periods = w )
35
- with pytest .raises (ValueError ):
36
+ with pytest .raises (ValueError , match = msg ):
36
37
c (win_type = "boxcar" , window = 2 , min_periods = 1 , center = w )
37
38
38
39
for wt in ["foobar" , 1 ]:
39
- with pytest .raises (ValueError ):
40
+ with pytest .raises (ValueError , match = "Invalid win_type" ):
40
41
c (win_type = wt , window = 2 )
41
42
42
43
@td .skip_if_no_scipy
You can’t perform that action at this time.
0 commit comments