Esempio n. 1
0
 def test_agm_success(self):
     input_dir = os.path.join(WD, 'data_files',
                              'Measurement_Import', 'agm_magic')
     program_ran, filename = ipmag.agm_magic('agm_magic_example.agm',
                                             outfile='agm_magic_example.magic',
                                             input_dir_path=input_dir)
     self.assertTrue(program_ran)
     self.assertEqual(filename, os.path.join('.', 'agm_magic_example.magic'))
Esempio n. 2
0
 def test_agm_success(self):
     input_dir = os.path.join(WD, 'data_files',
                              'Measurement_Import', 'agm_magic')
     program_ran, filename = ipmag.agm_magic('agm_magic_example.agm',
                                             outfile='agm_magic_example.magic',
                                             input_dir_path=input_dir)
     self.assertTrue(program_ran)
     self.assertEqual(filename, os.path.join('.', 'agm_magic_example.magic'))
Esempio n. 3
0
 def test_agm_with_bad_file(self):
     program_ran, error_message = ipmag.agm_magic('bad_file.txt')
     self.assertFalse(program_ran)
     self.assertEqual(error_message, 'You must provide a valid agm file')
Esempio n. 4
0
 def test_agm_with_no_files(self):
     with self.assertRaises(TypeError):
         ipmag.agm_magic()
Esempio n. 5
0
 def test_agm_with_bad_file(self):
     program_ran, error_message = ipmag.agm_magic('bad_file.txt')
     self.assertFalse(program_ran)
     self.assertEqual(error_message, 'You must provide a valid agm file')
Esempio n. 6
0
 def test_agm_with_no_files(self):
     with self.assertRaises(TypeError):
         ipmag.agm_magic()