def test_bar_chart_10(self): """ should return bar-chart -><- """ self.assertEqual(spike([ 0, ], 1), ' ')
def run(): try: args, rows = Cli.__read() print(spike(args, rows)) sys.exit(0) except KeyboardInterrupt: sys.exit(1)
def test_bar_chart_9(self): """ should return bar-chart -><- """ self.assertEqual(spike([ .1, ], 0), '')
def test_bar_chart_3(self): """ should return bar-chart ->u'\u2588'<- """ self.assertEqual(spike([ .1, ], 1), u'\u2588')
def main(): args, rows = read_args() try: if args.__len__() < 1: args = sys.stdin.read().strip().replace('\n', ' ').split(' ') if args.__len__() < 1: sys.stderr.write(Spike.usage()) return 1 args = list(filter(None, args)) print(spike(args, rows)) sys.exit(0) except KeyboardInterrupt: sys.exit(1)
def test_bar_chart_8(self): """ should return bar-chart ->u'\u2581\u2582\u2583\u2584\u2585\u2586\u2587\u2588'<- """ self.assertEqual(spike([1, 2, 3, 4, 5, 6, 7, 8]), u'\u2581\u2582\u2583\u2584\u2585\u2586\u2587\u2588')
def test_bar_chart_7(self): """ should return bar-chart ->u'\u2581\u2582\u2583\u2584\u2585\u2586\u2587\u2588'<- """ self.assertEqual(spike([.1, .2, .3, .4, .5, .6, .7, .8]), u'\u2581\u2582\u2583\u2584\u2585\u2586\u2587\u2588')
def test_bar_chart_6(self): """ should return bar-chart ->u'\u2583\u2585\u2588'<- """ self.assertEqual(spike([1, 2, 3], rows=1), u'\u2583\u2585\u2588')