def test_date():
 date_chart = DateLine(truncate_label=1000)
 date_chart.add('dates', [(date(2013, 1, 2), 300), (date(2013, 1, 12), 412), (date(2013, 2, 2), 823), (date(2013, 2, 22), 672)])
 q = date_chart.render_pyquery()
 assert (list(map((lambda t: t.split(' ')[0]), q('.axis.x text').map(texts))) == ['2013-01-12', '2013-01-24', '2013-02-04', '2013-02-16'])

def test_date ( ) : date_chart = DateLine ( truncate_label = 1000 ) date_chart . add ( 'dates' , [ ( date ( 2013 , 1 , 2 ) , 300 ) , ( date ( 2013 , 1 , 12 ) , 412 ) , ( date ( 2013 , 2 , 2 ) , 823 ) , ( date ( 2013 , 2 , 22 ) , 672 ) ] ) q = date_chart . render_pyquery ( ) assert ( list ( map ( ( lambda t : t . split ( ' ' ) [ 0 ] ) , q ( '.axis.x text' ) . map ( texts ) ) ) == [ '2013-01-12' , '2013-01-24' , '2013-02-04' , '2013-02-16' ] )
test a simple dateline .