def test_boxplot(self): 'It does a bloxplot for integers' box = IntBoxplot() box.append(1, 50) box.append(1, 40) box.append(1, 30) box.append(1, 40) box.append(2, 30) box.append(2, 10) box.append(2, 20) box.append(2, 40) box.append('no distrib', 40) counts = box.aggregated_array assert sum(counts.values()) == 9 plot = box.ascii_plot assert '2:10.0,15.0,25.0,35.0,40.0 <-----[============|=======' in plot
def test_boxplot(self): 'It does a bloxplot for integers' box = IntBoxplot() box.append(1, 50) box.append(1, 40) box.append(1, 30) box.append(1, 40) box.append(2, 30) box.append(2, 10) box.append(2, 20) box.append(2, 40) box.append('no distrib', 40) counts = box.aggregated_array assert sum(counts.values()) == 9 plot = box.ascii_plot assert '2:10.0,15.0,25.0,35.0,40.0 <-----[============|=======' in plot
def test_int_boxplot(self): box = IntBoxplot() box.append(1, 50) box.append(1, 40) box.append(1, 30) box.append(1, 40) box.append(2, 30) box.append(2, 10) box.append(2, 20) box.append(2, 40) fhand = NamedTemporaryFile(suffix='.png') draw_int_boxplot(box, fhand=fhand)
def test_int_boxplot(self): box = IntBoxplot() box.append(1, 50) box.append(1, 40) box.append(1, 30) box.append(1, 40) box.append(2, 30) box.append(2, 10) box.append(2, 20) box.append(2, 40) fhand = NamedTemporaryFile(suffix='.png') draw_int_boxplot(box, fhand=fhand)