def test_shifted_sparktext():
 chart = Line()
 chart.add('_', list(map((lambda x: (x + 10000)), range(8))))
 assert (chart.render_sparktext() == u('\xe2\x96\x81\xe2\x96\x82\xe2\x96\x83\xe2\x96\x84\xe2\x96\x85\xe2\x96\x86\xe2\x96\x87\xe2\x96\x88'))
 assert (chart.render_sparktext(relative_to=0) == u('\xe2\x96\x87\xe2\x96\x87\xe2\x96\x87\xe2\x96\x87\xe2\x96\x87\xe2\x96\x87\xe2\x96\x87\xe2\x96\x88'))

def test_shifted_sparktext ( ) : chart = Line ( ) chart . add ( '_' , list ( map ( ( lambda x : ( x + 10000 ) ) , range ( 8 ) ) ) ) assert ( chart . render_sparktext ( ) == u ( '\xe2\x96\x81\xe2\x96\x82\xe2\x96\x83\xe2\x96\x84\xe2\x96\x85\xe2\x96\x86\xe2\x96\x87\xe2\x96\x88' ) ) assert ( chart . render_sparktext ( relative_to = 0 ) == u ( '\xe2\x96\x87\xe2\x96\x87\xe2\x96\x87\xe2\x96\x87\xe2\x96\x87\xe2\x96\x87\xe2\x96\x87\xe2\x96\x88' ) )
test relative_to option in sparktext .