コード例 #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)
コード例 #2
0
ファイル: test_imports2.py プロジェクト: allochthonous/PmagPy
 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")
コード例 #3
0
ファイル: test_imports2.py プロジェクト: allochthonous/PmagPy
 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)
コード例 #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)
コード例 #5
0
ファイル: test_imports2.py プロジェクト: CrabGit334/PmagPy
 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)
コード例 #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"
     )
コード例 #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)
コード例 #8
0
ファイル: test_imports2.py プロジェクト: allochthonous/PmagPy
 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)
コード例 #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')
コード例 #10
0
ファイル: test_imports2.py プロジェクト: allochthonous/PmagPy
 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')