@@ -121,8 +121,7 @@ def setup(self):
121
121
'q1' : 1.3597529879465153 ,
122
122
'q3' : 14.85246294739361 ,
123
123
'whishi' : 27.899688243699629 ,
124
- 'whislo' : 0.042143774965502923 ,
125
- 'label' : 1
124
+ 'whislo' : 0.042143774965502923
126
125
}
127
126
128
127
self .known_bootstrapped_ci = {
@@ -136,10 +135,6 @@ def setup(self):
136
135
'fliers' : np .array ([92.55467075 , 87.03819018 ]),
137
136
}
138
137
139
- self .known_res_with_labels = {
140
- 'label' : 'Test1'
141
- }
142
-
143
138
self .known_res_percentiles = {
144
139
'whislo' : 0.1933685896907924 ,
145
140
'whishi' : 42.232049135969874
@@ -229,11 +224,15 @@ def test_results_whiskers_percentiles(self):
229
224
)
230
225
231
226
def test_results_withlabels (self ):
232
- labels = ['Test1' , 2 , 3 , 4 ]
227
+ labels = ['Test1' , 2 , 'ardvark' , 4 ]
233
228
results = cbook .boxplot_stats (self .data , labels = labels )
234
229
res = results [0 ]
235
- for key in list (self .known_res_with_labels .keys ()):
236
- assert_equal (res [key ], self .known_res_with_labels [key ])
230
+ for lab , res in zip (labels , results ):
231
+ assert_equal (res ['label' ], lab )
232
+
233
+ results = cbook .boxplot_stats (self .data )
234
+ for res in results :
235
+ assert ('label' not in res )
237
236
238
237
@raises (ValueError )
239
238
def test_label_error (self ):
0 commit comments