Пример #1
0
 def test_simple(self):
     ipkg = InstalledPkgDescription(self.sections, self.meta, {})
     sections = ipkg.resolve_paths()
     res = sorted([(kind, source, target) for kind, source, target in iter_files(sections)])
     target_dir = ipkg.resolve_path(os.path.join("$prefix", "target"))
     ref = [("pythonfiles", os.path.join("source", "scripts", "bar.py"), os.path.join(target_dir, "scripts", "bar.py")),
            ("pythonfiles", os.path.join("source", "scripts", "foo.py"), os.path.join(target_dir, "scripts", "foo.py"))]
     self.assertEqual(res, ref)
Пример #2
0
 def test_simple(self):
     ipkg = InstalledPkgDescription(self.sections, self.meta, {})
     sections = ipkg.resolve_paths(self.top_node)
     res = sorted([(kind, source.abspath(), target.abspath()) \
                   for kind, source, target in iter_files(sections)])
     target_dir = ipkg.resolve_path(os.path.join("$prefix", "target"))
     ref = [("pythonfiles",
             os.path.join(self.top_node.abspath(), "source", "scripts",
                          "bar.py"),
             os.path.join(target_dir, "scripts", "bar.py")),
            ("pythonfiles",
             os.path.join(self.top_node.abspath(), "source", "scripts",
                          "foo.py"),
             os.path.join(target_dir, "scripts", "foo.py"))]
     self.assertEqual(res, ref)