示例#1
0
文件: test.py 项目: shaygalon/bench
 def test_csv_parsing_dog_col_filter_equals_single(self):
     args = get_arguments([
         '-f', 'ex*/my*/dog*', '-c', 'hunger', '-n', 'pet_hunger',
         '--xaxis', 'timestamp', '--col_eq_val', 'name=buttons'
     ])
     csv = get_csv_list(args)[0]
     self.assertEqual(csv.data['hunger'][0], 4.0)
示例#2
0
文件: test.py 项目: shaygalon/bench
 def test_csv_parsing_dog(self):
     args = get_arguments([
         '-f', 'ex*/my*/dog*', '-c', 'hunger', '-n', 'pet_hunger',
         '--xaxis', 'timestamp'
     ])
     csv = get_csv_list(args)[0]
     self.assertEqual(csv.numrows, 12)
     self.assertEqual(len(csv.data), 2)
示例#3
0
 def test_plotter_arg_filename(self):
     args = get_arguments(['-d', 'ex*/my*', '-c', 'hunger', '-I'])
     csv_list = get_csv_list(args)
     plot = Plotter(args, csv_list)
     self.assertEqual(plot.arg['name'], 'my_examples.png')
示例#4
0
 def test_plotter_default_name_dir(self):
     args = get_arguments(['-d', 'ex*/my*', '-c', 'hunger', '-n', 'pet_hunger'])
     csv_list = get_csv_list(args)
     plot = Plotter(args, csv_list)
     self.assertEqual(plot.arg['name'], 'pet_hunger.html')
示例#5
0
文件: test.py 项目: shaygalon/bench
 def test_plotter_arg_filename(self):
     args = get_arguments(['-d', 'ex*/my*', '-c', 'hunger', '-I'])
     csv_list = get_csv_list(args)
     plot = Plotter(args, csv_list)
     self.assertEqual(plot.arg['name'], 'my_examples.png')
示例#6
0
文件: test.py 项目: shaygalon/bench
 def test_plotter_default_name_dir(self):
     args = get_arguments(['-d', 'ex*/my*', '-c', 'hunger', '-n', 'pet_hunger'])
     csv_list = get_csv_list(args)
     plot = Plotter(args, csv_list)
     self.assertEqual(plot.arg['name'], 'pet_hunger.html')
示例#7
0
文件: test.py 项目: shaygalon/bench
 def test_csv_parsing_dog_col_filter_equals_multiple(self):
     args = get_arguments(['-f', 'ex*/my*/dog*', '-c', 'hunger', '-n', 'pet_hunger', '--xaxis', 'timestamp',
                           '--col_eq_val', 'name=buttons&timestamp=8'])
     csv = get_csv_list(args)[0]
     self.assertEqual(len(csv.data['timestamp']), 1)
     self.assertEqual(csv.data['timestamp'][0], 8.0)
示例#8
0
文件: test.py 项目: shaygalon/bench
 def test_csv_parsing_dog(self):
     args = get_arguments(['-f', 'ex*/my*/dog*', '-c', 'hunger', '-n', 'pet_hunger', '--xaxis', 'timestamp'])
     csv = get_csv_list(args)[0]
     self.assertEqual(csv.numrows, 12)
     self.assertEqual(len(csv.data), 2)