def test_iodp_with_files(self): options = {} dir_path = os.path.join(WD, 'data_files', 'Measurement_Import', 'iodp_srm_magic') options['dir_path'] = dir_path program_ran, outfile = iodp_srm_magic.main(False, **options) self.assertTrue(program_ran)
def test_iodp_with_one_file(self): options = {} #dir_path = os.path.join(WD, 'data_files', 'Measurement_Import', # 'iodp_srm_magic') dir_path = os.path.join(WD, 'data_files', 'UTESTA', 'SRM_data') options['input_dir_path'] = dir_path options['csv_file'] = 'srmsection-XXX-UTEST-A.csv' program_ran, outfile = iodp_srm_magic.main(False, **options) self.assertTrue(program_ran) self.assertEqual(outfile, os.path.join('.', 'magic_measurements.txt'))
def test_iodp_with_no_files(self): program_ran, error_message = iodp_srm_magic.main(False) self.assertFalse(program_ran) self.assertEqual(error_message, 'No .csv files were found')