def _create_pmdoc(self, package_type): self.package.set_mode(package_type) m.action(_("Creating pmdoc for package %s " % self.package)) pmdoc = PMDoc(self.package, self.store, self.tmp, self.packages_paths[package_type], self.empty_packages[package_type], package_type) pmdoc_path = pmdoc.create() output_file = os.path.join(self.output_dir, self._package_name('.pkg')) output_file = os.path.abspath(output_file) pm = PackageMaker() pm.create_package_from_pmdoc(pmdoc_path, output_file) return output_file
def testAllFilesCreated(self): d = dict() packages = ['gstreamer-test1', 'gstreamer-test3', 'gstreamer-test-bindings', 'gstreamer-test2'] for name in packages: p =self.store.get_package(name) d[p] = self.packages_path self.package.__file__ = '' pmdoc = PMDoc(self.package, self.store, self.tmp, d) path = pmdoc.create() files = os.listdir(path) expected_files = ['index.xml'] for p in packages: expected_files.append("%s.xml" % p) expected_files.append("%s-contents.xml" % p) self.assertEqual(sorted(files), sorted(expected_files))
def testAllFilesCreated(self): d = dict() packages = [ 'gstreamer-test1', 'gstreamer-test3', 'gstreamer-test-bindings', 'gstreamer-test2' ] for name in packages: p = self.store.get_package(name) d[p] = self.packages_path self.package.__file__ = '' pmdoc = PMDoc(self.package, self.store, self.tmp, d) path = pmdoc.create() files = os.listdir(path) expected_files = ['index.xml'] for p in packages: expected_files.append("%s.xml" % p) expected_files.append("%s-contents.xml" % p) self.assertEquals(sorted(files), sorted(expected_files))