Beispiel #1
0
 def test_cit_magic_with_file(self):
     options = {}
     options['input_dir_path'] = os.path.join(WD, 'data_files',
                                              'Measurement_Import',
                                              'CIT_magic', 'PI47')
     options['magfile'] = 'PI47-.sam'
     program_ran, outfile = cit_magic.main(False, **options)
     self.assertTrue(program_ran)
     expected_file = os.path.join('.', 'magic_measurements.txt')
     self.assertEqual(outfile, expected_file)
Beispiel #2
0
 def test_cit_magic_fail_option4(self):
     options = {}
     options['input_dir_path'] = os.path.join(WD, 'data_files',
                                              'Measurement_Import',
                                              'CIT_magic', 'PI47')
     options['magfile'] = 'PI47-.sam'
     options['samp_con'] = '4'
     program_ran, error_message = cit_magic.main(False, **options)
     self.assertFalse(program_ran)
     self.assertEqual(error_message, "naming convention option [4] must be in form 4-Z where Z is an integer")
Beispiel #3
0
 def test_cit_magic_with_file(self):
     options = {}
     options['input_dir_path'] = os.path.join(WD, 'data_files',
                                              'Measurement_Import',
                                              'CIT_magic', 'PI47')
     options['magfile'] = 'PI47-.sam'
     program_ran, outfile = cit_magic.main(False, **options)
     self.assertTrue(program_ran)
     expected_file = os.path.join('.', 'magic_measurements.txt')
     self.assertEqual(outfile, expected_file)
Beispiel #4
0
 def test_cit_magic_succeed_option4(self):
     options = {}
     options['input_dir_path'] = os.path.join(WD, 'data_files',
                                              'convert_2_magic',
                                              'cit_magic', 'PI47')
     options['magfile'] = 'PI47-.sam'
     options['samp_con'] = '4-3'
     program_ran, outfile = cit_magic.main(False, **options)
     self.assertTrue(program_ran)
     expected_file = os.path.join('.', 'magic_measurements.txt')
     self.assertEqual(outfile, expected_file)
Beispiel #5
0
 def test_cit_magic_succeed_option4(self):
     options = {}
     options['input_dir_path'] = os.path.join(WD, 'data_files',
                                              'convert_2_magic',
                                              'cit_magic', 'PI47')
     options['magfile'] = 'PI47-.sam'
     options['samp_con'] = '4-3'
     program_ran, outfile = cit_magic.main(False, **options)
     self.assertTrue(program_ran)
     expected_file = os.path.join('.', 'magic_measurements.txt')
     self.assertEqual(outfile, expected_file)
Beispiel #6
0
 def test_cit_magic_fail_option4(self):
     options = {}
     options['input_dir_path'] = os.path.join(WD, 'data_files',
                                              'Measurement_Import',
                                              'CIT_magic', 'PI47')
     options['magfile'] = 'PI47-.sam'
     options['samp_con'] = '4'
     program_ran, error_message = cit_magic.main(False, **options)
     self.assertFalse(program_ran)
     self.assertEqual(
         error_message,
         "naming convention option [4] must be in form 4-Z where Z is an integer"
     )
Beispiel #7
0
 def test_cit_magic_with_other_data(self):
     options = {}
     options['input_dir_path'] = os.path.join(WD, 'data_files',
                                              'Measurement_Import',
                                              'CIT_magic', 'PI47')
     options['magfile'] = 'PI47-.sam'
     options['samp_con'] = '1'
     options['methods'] = ['SO-SM:SO-MAG']
     options['locname'] = 'location'
     options['avg'] = 1
     options['specnum'] = 2
     program_ran, outfile = cit_magic.main(False, **options)
     self.assertTrue(program_ran)
     expected_file = os.path.join('.', 'magic_measurements.txt')
     self.assertEqual(outfile, expected_file)
Beispiel #8
0
 def test_cit_magic_with_other_data(self):
     options = {}
     options['input_dir_path'] = os.path.join(WD, 'data_files',
                                              'Measurement_Import',
                                              'CIT_magic', 'PI47')
     options['magfile'] = 'PI47-.sam'
     options['samp_con'] = '1'
     options['methods'] = ['SO-SM:SO-MAG']
     options['locname'] = 'location'
     options['avg'] = 1
     options['specnum'] = 2
     program_ran, outfile = cit_magic.main(False, **options)
     self.assertTrue(program_ran)
     expected_file = os.path.join('.', 'magic_measurements.txt')
     self.assertEqual(outfile, expected_file)
Beispiel #9
0
 def test_cit_with_no_files(self):
     program_ran, error_message = cit_magic.main(False)
     self.assertFalse(program_ran)
     self.assertEqual(error_message, 'bad sam file name')
Beispiel #10
0
 def test_cit_with_no_files(self):
     program_ran, error_message = cit_magic.main(False)
     self.assertFalse(program_ran)
     self.assertEqual(error_message, 'bad sam file name')