Example #1
0
 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)
Example #2
0
 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)
Example #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')
Example #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')
Example #5
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')
Example #6
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')
Example #7
0
 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)
Example #8
0
 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)