Пример #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)
Пример #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)
Пример #3
0
 def test_min_args(self):
     args = get_arguments(['-d', 'foo', '-c', 'bar'])
     self.assertTrue(args.dir and args.cols)
Пример #4
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')
Пример #5
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')
Пример #6
0
 def test_min_args(self):
     args = get_arguments(['-d', 'foo', '-c', 'bar'])
     self.assertTrue(args.dir and args.cols)
Пример #7
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')
Пример #8
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')
Пример #9
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)
Пример #10
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)