def test_time():
 time_chart = TimeLine(truncate_label=1000)
 time_chart.add('times', [(time(1, 12, 29), 2), (time(21, 2, 29), 10), (time(12, 30, 59), 7)])
 q = time_chart.render_pyquery()
 assert (list(map((lambda t: t.split(' ')[0]), q('.axis.x text').map(texts))) == ['02:46:40', '05:33:20', '08:20:00', '11:06:40', '13:53:20', '16:40:00', '19:26:40'])

def test_time ( ) : time_chart = TimeLine ( truncate_label = 1000 ) time_chart . add ( 'times' , [ ( time ( 1 , 12 , 29 ) , 2 ) , ( time ( 21 , 2 , 29 ) , 10 ) , ( time ( 12 , 30 , 59 ) , 7 ) ] ) q = time_chart . render_pyquery ( ) assert ( list ( map ( ( lambda t : t . split ( ' ' ) [ 0 ] ) , q ( '.axis.x text' ) . map ( texts ) ) ) == [ '02:46:40' , '05:33:20' , '08:20:00' , '11:06:40' , '13:53:20' , '16:40:00' , '19:26:40' ] )
test a simple timeline .