Пример #1
0
 def test_generate_pot_empty_domain(self):
     # Generate a generic PO template.
     self.prepare_package("intltool_full_ok")
     self.assertTrue(generate_pot("./po-module1", ""),
                     "PO template generation failed.")
     expected_path = "./po-module1/messages.pot"
     self.assertTrue(
         os.access(expected_path, os.F_OK),
         "Generated PO template '%s' not found." % expected_path)
 def test_generate_pot_empty_domain(self):
     # Generate a generic PO template.
     self.prepare_package("intltool_full_ok")
     self.assertTrue(
         generate_pot("./po-module1", ""),
         "PO template generation failed.")
     expected_path = "./po-module1/messages.pot"
     self.assertTrue(
         os.access(expected_path, os.F_OK),
         "Generated PO template '%s' not found." % expected_path)
Пример #3
0
 def test_generate_pot_not_intltool(self):
     # Fail when not an intltool setup.
     self.prepare_package("intltool_full_ok")
     # Cripple the setup.
     os.remove("./po-module1/POTFILES.in")
     self.assertFalse(generate_pot("./po-module1", "nothing"),
                      "PO template generation should have failed.")
     not_expected_path = "./po-module1/nothing.pot"
     self.assertFalse(
         os.access(not_expected_path, os.F_OK),
         "Not expected PO template '%s' generated." % not_expected_path)
 def test_generate_pot_not_intltool(self):
     # Fail when not an intltool setup.
     self.prepare_package("intltool_full_ok")
     # Cripple the setup.
     os.remove("./po-module1/POTFILES.in")
     self.assertFalse(
         generate_pot("./po-module1", "nothing"),
         "PO template generation should have failed.")
     not_expected_path = "./po-module1/nothing.pot"
     self.assertFalse(
         os.access(not_expected_path, os.F_OK),
         "Not expected PO template '%s' generated." % not_expected_path)