def test_show_legend():
 line = Line()
 line.add('_', [1, 2, 3])
 q = line.render_pyquery()
 assert (len(q('.legend')) == 1)
 line.show_legend = False
 q = line.render_pyquery()
 assert (len(q('.legend')) == 0)

def test_show_legend ( ) : line = Line ( ) line . add ( '_' , [ 1 , 2 , 3 ] ) q = line . render_pyquery ( ) assert ( len ( q ( '.legend' ) ) == 1 ) line . show_legend = False q = line . render_pyquery ( ) assert ( len ( q ( '.legend' ) ) == 0 )
test show legend option .