File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 16
16
17
17
**Fixed: **
18
18
19
- * Surpress `RuntimeWarning ` in tests for the `applycutoff ` function
19
+ * Surpress the `RuntimeWarning ` in tests for the `applycutoff ` function
20
20
21
21
**Security: **
22
22
Original file line number Diff line number Diff line change @@ -105,9 +105,12 @@ def test_applycutoff_range1(self):
105
105
self .test_gui .qminentry .insert (0 , "10" )
106
106
self .test_gui .qmaxentry .insert (0 , "40" )
107
107
108
- # when
108
+ # Desired behavior is nans in the arrays below qmin and above qmax. As a result, np.nanmax will generate
109
+ # runtimewarnings when it # encounters slices that are all nans. capture these so tests pass cleanly
110
+ # without warnings
109
111
with warnings .catch_warnings ():
110
112
warnings .simplefilter ("ignore" , category = RuntimeWarning )
113
+ # when
111
114
self .test_gui .applycutoff ()
112
115
result = self .test_gui .cube
113
116
@@ -121,9 +124,12 @@ def test_applycutoff_range2(self):
121
124
self .test_gui .qminentry .insert (0 , "15" )
122
125
self .test_gui .qmaxentry .insert (0 , "35" )
123
126
124
- # when
127
+ # Desired behavior is nans in the arrays below qmin and above qmax. As a result, np.nanmax will generate
128
+ # runtimewarnings when it # encounters slices that are all nans. capture these so tests pass cleanly
129
+ # without warnings
125
130
with warnings .catch_warnings ():
126
131
warnings .simplefilter ("ignore" , category = RuntimeWarning )
132
+ # when
127
133
self .test_gui .applycutoff ()
128
134
result = self .test_gui .cube
129
135
You can’t perform that action at this time.
0 commit comments