Ejemplo n.º 1
0
 def test_directory_checks(self):
     dirs = {
         os.path.join(base_path, "dir_check/webidl_plus"): ['webidl', 'test'],
         os.path.join(base_path, "dir_check/only_webidl"): ['webidl']
         }
     errors = tidy.check_directory_files(dirs)
     error_dir = os.path.join(base_path, "dir_check/webidl_plus")
     self.assertEqual("Unexpected extension found for test.rs. We only expect files with webidl, test extensions in {0}".format(error_dir), errors.next()[2])
     self.assertEqual("Unexpected extension found for test2.rs. We only expect files with webidl, test extensions in {0}".format(error_dir), errors.next()[2])
     self.assertNoMoreErrors(errors)
Ejemplo n.º 2
0
 def test_directory_checks(self):
     dirs = {
         os.path.join(base_path, "dir_check/webidl_plus"): ['webidl', 'test'],
         os.path.join(base_path, "dir_check/only_webidl"): ['webidl']
         }
     errors = tidy.check_directory_files(dirs)
     error_dir = os.path.join(base_path, "dir_check/webidl_plus")
     self.assertEqual("Unexpected extension found for test.rs. We only expect files with webidl, test extensions in {0}".format(error_dir), next(errors)[2])
     self.assertEqual("Unexpected extension found for test2.rs. We only expect files with webidl, test extensions in {0}".format(error_dir), next(errors)[2])
     self.assertNoMoreErrors(errors)