def test_check_potfiles_in_content_not_ok_file_removed(self):
     # If a file is missing that is listed in POTFILES.in, the file
     # intltool structure is probably broken and cannot be used for
     # our purposes.
     self.prepare_package("intltool_single_ok")
     os.remove("./src/sourcefile1.c")
     self.assertFalse(check_potfiles_in("./po"))
Пример #2
0
 def test_check_potfiles_in_content_not_ok_file_removed(self):
     # If a file is missing that is listed in POTFILES.in, the file
     # intltool structure is probably broken and cannot be used for
     # our purposes.
     self.prepare_package("intltool_single_ok")
     os.remove("./src/sourcefile1.c")
     self.assertFalse(check_potfiles_in("./po"))
 def test_check_potfiles_in_content_ok_file_added(self):
     # If a file is not listed in POTFILES.in, the file is still good for
     # our purposes.
     self.prepare_package("intltool_single_ok")
     added_file = file("./src/sourcefile_new.c", "w")
     added_file.write("/* Test file. */")
     added_file.close()
     self.assertTrue(check_potfiles_in("./po"))
Пример #4
0
 def test_check_potfiles_in_content_ok_file_added(self):
     # If a file is not listed in POTFILES.in, the file is still good for
     # our purposes.
     self.prepare_package("intltool_single_ok")
     added_file = file("./src/sourcefile_new.c", "w")
     added_file.write("/* Test file. */")
     added_file.close()
     self.assertTrue(check_potfiles_in("./po"))
 def test_check_potfiles_in_content_ok(self):
     # Ideally all files listed in POTFILES.in exist in the source package.
     self.prepare_package("intltool_single_ok")
     self.assertTrue(check_potfiles_in("./po"))
 def test_check_potfiles_in_wrong_directory(self):
     # Passing in the wrong directory will cause the check to fail
     # gracefully and return False.
     self.prepare_package("intltool_single_ok")
     self.assertFalse(check_potfiles_in("./foo"))
Пример #7
0
 def test_check_potfiles_in_content_ok(self):
     # Ideally all files listed in POTFILES.in exist in the source package.
     self.prepare_package("intltool_single_ok")
     self.assertTrue(check_potfiles_in("./po"))
Пример #8
0
 def test_check_potfiles_in_wrong_directory(self):
     # Passing in the wrong directory will cause the check to fail
     # gracefully and return False.
     self.prepare_package("intltool_single_ok")
     self.assertFalse(check_potfiles_in("./foo"))