コード例 #1
0
 def test_sio_magic_success(self):
     options = {}
     options['mag_file'] = os.path.join(WD, 'data_files',
                                        'Measurement_Import', 'sio_magic',
                                        'sio_af_example.dat')
     meas_file = os.path.join(WD, 'data_files', 'Measurement_Import',
                              'sio_magic', 'sio_af_example.magic')
     options['meas_file'] = meas_file
     program_ran, file_name = sio_magic.main(False, **options)
     self.assertTrue(program_ran)
     self.assertEqual(file_name, meas_file)
コード例 #2
0
 def test_sio_magic_success(self):
     options = {}
     options['mag_file'] = os.path.join(WD, 'data_files',
                                        'Measurement_Import', 'sio_magic',
                                        'sio_af_example.dat')
     meas_file = os.path.join(WD, 'data_files', 'Measurement_Import',
                              'sio_magic', 'sio_af_example.magic')
     options['meas_file'] = meas_file
     program_ran, file_name = sio_magic.main(False, **options)
     self.assertTrue(program_ran)
     self.assertEqual(file_name, meas_file)
コード例 #3
0
 def test_sio_magic_fail_with_coil(self):
     options = {}
     options['mag_file'] = os.path.join(WD, 'data_files',
                                        'Measurement_Import', 'sio_magic',
                                        'sio_af_example.dat')
     meas_file = os.path.join(WD, 'data_files', 'Measurement_Import',
                              'sio_magic', 'sio_af_example.magic')
     options['meas_file'] = meas_file
     options['coil'] = 4
     program_ran, error_message = sio_magic.main(False, **options)
     self.assertFalse(program_ran)
     self.assertEqual(error_message, '4 is not a valid coil specification')
コード例 #4
0
 def test_sio_magic_fail_option4(self):
     options = {}
     options['mag_file'] = os.path.join(WD, 'data_files',
                                        'Measurement_Import', 'sio_magic',
                                        'sio_af_example.dat')
     meas_file = os.path.join(WD, 'data_files', 'Measurement_Import',
                              'sio_magic', 'sio_af_example.magic')
     options['meas_file'] = meas_file
     options['samp_con'] = '4'
     program_ran, error_message = sio_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")
コード例 #5
0
 def test_sio_magic_fail_with_coil(self):
     options = {}
     options['mag_file'] = os.path.join(WD, 'data_files',
                                        'Measurement_Import', 'sio_magic',
                                        'sio_af_example.dat')
     meas_file = os.path.join(WD, 'data_files', 'Measurement_Import',
                              'sio_magic', 'sio_af_example.magic')
     options['meas_file'] = meas_file
     options['coil'] = 4
     program_ran, error_message = sio_magic.main(False, **options)
     self.assertFalse(program_ran)
     self.assertEqual(error_message, '4 is not a valid coil specification')
コード例 #6
0
 def test_sio_magic_fail_option4(self):
     options = {}
     options['mag_file'] = os.path.join(WD, 'data_files',
                                        'Measurement_Import', 'sio_magic',
                                        'sio_af_example.dat')
     meas_file = os.path.join(WD, 'data_files', 'Measurement_Import',
                              'sio_magic', 'sio_af_example.magic')
     options['meas_file'] = meas_file
     options['samp_con'] = '4'
     program_ran, error_message = sio_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_sio_magic_no_files(self):
     program_ran, error_message = sio_magic.main(False)
     self.assertFalse(program_ran)
     self.assertEqual(error_message, 'mag_file field is required option')
コード例 #8
0
 def test_sio_magic_no_files(self):
     program_ran, error_message = sio_magic.main(False)
     self.assertFalse(program_ran)
     self.assertEqual(error_message, 'mag_file field is required option')