def test_pie_table():
 chart = Pie(inner_radius=0.3, pretty_print=True)
 chart.title = 'Browser usage in February 2012 (in %)'
 chart.add('IE', 19.5)
 chart.add('Firefox', 36.6)
 chart.add('Chrome', 36.3)
 chart.add('Safari', 4.5)
 chart.add('Opera', 2.3)
 q = pq(chart.render_table())
 assert (len(q('table')) == 1)

def test_pie_table ( ) : chart = Pie ( inner_radius = 0.3 , pretty_print = True ) chart . title = 'Browser usage in February 2012 (in %)' chart . add ( 'IE' , 19.5 ) chart . add ( 'Firefox' , 36.6 ) chart . add ( 'Chrome' , 36.3 ) chart . add ( 'Safari' , 4.5 ) chart . add ( 'Opera' , 2.3 ) q = pq ( chart . render_table ( ) ) assert ( len ( q ( 'table' ) ) == 1 )
test rendering a table for a pie .