summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-06-10 19:31:22 -0700
committerZac Medico <zmedico@gentoo.org>2011-06-10 19:31:22 -0700
commit796d15114b331a11a8528516739f093cdcb6ff6c (patch)
tree2a6de1e96cf88d03d5ecd44c3db9214f63c566b3
parent8e9726b5b0ce5bf07fe970eac4fc8794ddaa9d05 (diff)
downloadportage-796d15114b331a11a8528516739f093cdcb6ff6c.tar.gz
portage-796d15114b331a11a8528516739f093cdcb6ff6c.tar.bz2
portage-796d15114b331a11a8528516739f093cdcb6ff6c.zip
test_fakedbapi: define PORTDIR, test missing IUSE
-rw-r--r--pym/portage/tests/dbapi/test_fakedbapi.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/pym/portage/tests/dbapi/test_fakedbapi.py b/pym/portage/tests/dbapi/test_fakedbapi.py
index d1ea32d53..a2c5f778e 100644
--- a/pym/portage/tests/dbapi/test_fakedbapi.py
+++ b/pym/portage/tests/dbapi/test_fakedbapi.py
@@ -4,6 +4,7 @@
import shutil
import tempfile
+from portage import os
from portage.dbapi.virtual import fakedbapi
from portage.package.ebuild.config import config
from portage.tests import TestCase
@@ -17,7 +18,7 @@ class TestFakedbapi(TestCase):
"IUSE" : "ipc doc",
"repository" : "gentoo",
"SLOT" : "0",
- "USE" : "ipc",
+ "USE" : "ipc missing-iuse",
}),
("virtual/package-manager-0", {
"EAPI" : "0",
@@ -31,6 +32,9 @@ class TestFakedbapi(TestCase):
("sys-apps/portage:0[-ipc]", []),
("sys-apps/portage:0[doc]", []),
("sys-apps/portage:0[-doc]", ["sys-apps/portage-2.1.10"]),
+ ("sys-apps/portage:0", ["sys-apps/portage-2.1.10"]),
+ ("sys-apps/portage:0[missing-iuse]", []),
+ ("sys-apps/portage:0[-missing-iuse]", []),
("sys-apps/portage:0::gentoo[ipc]", ["sys-apps/portage-2.1.10"]),
("sys-apps/portage:0::multilib[ipc]", []),
("virtual/package-manager", ["virtual/package-manager-0"]),
@@ -38,8 +42,13 @@ class TestFakedbapi(TestCase):
tempdir = tempfile.mkdtemp()
try:
+ portdir = os.path.join(tempdir, "usr/portage")
+ os.makedirs(portdir)
+ env = {
+ "PORTDIR": portdir,
+ }
fakedb = fakedbapi(settings=config(config_profile_path="",
- config_root=tempdir, target_root=tempdir))
+ env=env, _eprefix=tempdir))
for cpv, metadata in packages:
fakedb.cpv_inject(cpv, metadata=metadata)