Ejemplo n.º 1
0
 def test_filename_file_name_default_dir_inexisting(self):
     with self.assertRaises(ValueError):
         util.find_file(filename="dummy.spec", default_folder="/wrong/path")
Ejemplo n.º 2
0
 def test_filename_file_name_inexisting_default_dir_existing(self):
     with self.assertRaises(ValueError):
         util.find_file(filename="dum.spec", default_folder=self.valid_path)
Ejemplo n.º 3
0
 def test_filename_file_name_default_dir_none(self):
     with self.assertRaises(TypeError):
         util.find_file(filename="dummy.spec", default_folder=None)
Ejemplo n.º 4
0
 def test_filename_file_name_missing_backslash(self):
     output = util.find_file(filename="dummy.spec",
                             default_folder=self.valid_path[:-1])
     self.assertTrue(output == self.valid_path + "dummy.spec")
Ejemplo n.º 5
0
 def test_filename_file_name(self):
     output = util.find_file(filename="dummy.spec",
                             default_folder=self.valid_path)
     self.assertTrue(output == self.valid_path + "dummy.spec")
Ejemplo n.º 6
0
 def test_full_path_to_file(self):
     output = util.find_file(filename=self.valid_path + "dummy.spec",
                             default_folder=None)
     self.assertTrue(output == self.valid_path + "dummy.spec")
Ejemplo n.º 7
0
 def test_filename_none(self):
     with self.assertRaises(TypeError):
         util.find_file(filename=None, default_folder=None)