summaryrefslogtreecommitdiffstats
path: root/pym/portage/tests/ebuild/test_config.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/tests/ebuild/test_config.py')
-rw-r--r--pym/portage/tests/ebuild/test_config.py21
1 files changed, 20 insertions, 1 deletions
diff --git a/pym/portage/tests/ebuild/test_config.py b/pym/portage/tests/ebuild/test_config.py
index 3d0be19e4..f4869c6b1 100644
--- a/pym/portage/tests/ebuild/test_config.py
+++ b/pym/portage/tests/ebuild/test_config.py
@@ -200,9 +200,17 @@ class ConfigTestCase(TestCase):
def testManifest(self):
+ distfiles = {
+ 'B-2.tar.bz2': b'binary\0content',
+ 'C-2.zip': b'binary\0content',
+ 'C-2.tar.bz2': b'binary\0content',
+ }
+
ebuilds = {
"dev-libs/A-1::old_repo": { },
"dev-libs/A-2::new_repo": { },
+ "dev-libs/B-2::new_repo": {"SRC_URI" : "B-2.tar.bz2"},
+ "dev-libs/C-2::new_repo": {"SRC_URI" : "C-2.zip C-2.tar.bz2"},
}
repo_configs = {
@@ -226,11 +234,22 @@ class ConfigTestCase(TestCase):
success = True),
)
- playground = ResolverPlayground(ebuilds=ebuilds, repo_configs=repo_configs)
+ playground = ResolverPlayground(ebuilds=ebuilds,
+ repo_configs=repo_configs, distfiles=distfiles)
new_manifest_file = os.path.join(playground.repo_dirs["new_repo"], "dev-libs", "A", "Manifest")
self.assertEqual(os.path.exists(new_manifest_file), False)
+ new_manifest_file = os.path.join(playground.repo_dirs["new_repo"], "dev-libs", "B", "Manifest")
+ f = open(new_manifest_file)
+ self.assertEqual(len(list(f)), 1)
+ f.close()
+
+ new_manifest_file = os.path.join(playground.repo_dirs["new_repo"], "dev-libs", "C", "Manifest")
+ f = open(new_manifest_file)
+ self.assertEqual(len(list(f)), 2)
+ f.close()
+
old_manifest_file = os.path.join(playground.repo_dirs["old_repo"], "dev-libs", "A", "Manifest")
f = open(old_manifest_file)
self.assertEqual(len(list(f)), 1)