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)
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)
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')
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')
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×tamp=8']) csv = get_csv_list(args)[0] self.assertEqual(len(csv.data['timestamp']), 1) self.assertEqual(csv.data['timestamp'][0], 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)