def test_include_x_axis(Chart):
 chart = Chart()
 if ((Chart in (Pie, Treemap, Radar, Funnel, Dot, Gauge, Histogram, Box, SolidGauge)) or issubclass(Chart, BaseMap)):
  return
 if (not chart._dual):
  data = (100, 200, 150)
 else:
  data = ((1, 100), (3, 200), (2, 150))
 chart.add('_', data)
 q = chart.render_pyquery()
 yaxis = ('.axis.%s .guides text' % ('y' if (not getattr(chart, 'horizontal', False)) else 'x'))
 if (not isinstance(chart, Bar)):
  assert ('0' not in q(yaxis).map(texts))
 else:
  assert ('0' in q(yaxis).map(texts))
 chart.include_x_axis = True
 q = chart.render_pyquery()
 assert ('0' in q(yaxis).map(texts))

def test_include_x_axis ( Chart ) : chart = Chart ( ) if ( ( Chart in ( Pie , Treemap , Radar , Funnel , Dot , Gauge , Histogram , Box , SolidGauge ) ) or issubclass ( Chart , BaseMap ) ) : return if ( not chart . _dual ) : data = ( 100 , 200 , 150 ) else : data = ( ( 1 , 100 ) , ( 3 , 200 ) , ( 2 , 150 ) ) chart . add ( '_' , data ) q = chart . render_pyquery ( ) yaxis = ( '.axis.%s .guides text' % ( 'y' if ( not getattr ( chart , 'horizontal' , False ) ) else 'x' ) ) if ( not isinstance ( chart , Bar ) ) : assert ( '0' not in q ( yaxis ) . map ( texts ) ) else : assert ( '0' in q ( yaxis ) . map ( texts ) ) chart . include_x_axis = True q = chart . render_pyquery ( ) assert ( '0' in q ( yaxis ) . map ( texts ) )
test x axis inclusion option .