Exemplo n.º 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)
Exemplo n.º 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)
Exemplo n.º 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')
Exemplo n.º 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")
Exemplo n.º 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')
Exemplo n.º 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"
     )
Exemplo n.º 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')
Exemplo n.º 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')