def test_empty_lists(Chart):
 chart = Chart()
 chart.add('A', [1, 2])
 chart.add('B', [])
 if (not chart._dual):
  chart.x_labels = ('red', 'green', 'blue')
 q = chart.render_pyquery()
 assert (len(q('.legend')) == 2)

def test_empty_lists ( Chart ) : chart = Chart ( ) chart . add ( 'A' , [ 1 , 2 ] ) chart . add ( 'B' , [ ] ) if ( not chart . _dual ) : chart . x_labels = ( 'red' , 'green' , 'blue' ) q = chart . render_pyquery ( ) assert ( len ( q ( '.legend' ) ) == 2 )
test chart rendering with an empty serie .