public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dbapi/
@ 2011-06-11  2:09 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2011-06-11  2:09 UTC (permalink / raw
  To: gentoo-commits

commit:     b7fbec5157cbe5a4faaa3d04d3656e354a805e11
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 11 02:08:46 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun 11 02:08:46 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=b7fbec51

Add tests for fakedbapi.

---
 pym/portage/tests/dbapi/__init__.py       |    2 +
 pym/portage/tests/dbapi/test_fakedbapi.py |   42 +++++++++++++++++++++++++++++
 2 files changed, 44 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/dbapi/__init__.py b/pym/portage/tests/dbapi/__init__.py
new file mode 100644
index 0000000..532918b
--- /dev/null
+++ b/pym/portage/tests/dbapi/__init__.py
@@ -0,0 +1,2 @@
+# Copyright 2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2

diff --git a/pym/portage/tests/dbapi/__test__ b/pym/portage/tests/dbapi/__test__
new file mode 100644
index 0000000..e69de29

diff --git a/pym/portage/tests/dbapi/test_fakedbapi.py b/pym/portage/tests/dbapi/test_fakedbapi.py
new file mode 100644
index 0000000..ed24782
--- /dev/null
+++ b/pym/portage/tests/dbapi/test_fakedbapi.py
@@ -0,0 +1,42 @@
+# Copyright 2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+from portage.dbapi.virtual import fakedbapi
+from portage.package.ebuild.config import config
+from portage.tests import TestCase
+
+class TestFakedbapi(TestCase):
+
+	def testFakedbapi(self):
+		packages = (
+			("sys-apps/portage-2.1.10", {
+				"EAPI"         : "2",
+				"IUSE"         : "ipc doc",
+				"repository"   : "gentoo",
+				"SLOT"         : "0",
+				"USE"          : "ipc",
+			}),
+			("virtual/package-manager-0", {
+				"EAPI"         : "0",
+				"repository"   : "gentoo",
+				"SLOT"         : "0",
+			}),
+		)
+
+		match_tests = (
+			("sys-apps/portage:0[ipc]",             ["sys-apps/portage-2.1.10"]),
+			("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::gentoo[ipc]",     ["sys-apps/portage-2.1.10"]),
+			("sys-apps/portage:0::multilib[ipc]",   []),
+			("virtual/package-manager",             ["virtual/package-manager-0"]),
+		)
+
+		fakedb = fakedbapi(settings=config(config_profile_path=""))
+		for cpv, metadata in packages:
+			fakedb.cpv_inject(cpv, metadata=metadata)
+
+		for atom, expected_result in match_tests:
+			result = []
+			self.assertEqual( fakedb.match(atom), expected_result )



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dbapi/
@ 2011-06-11  2:17 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2011-06-11  2:17 UTC (permalink / raw
  To: gentoo-commits

commit:     8e9726b5b0ce5bf07fe970eac4fc8794ddaa9d05
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 11 02:17:10 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun 11 02:17:10 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8e9726b5

test_fakedbapi: use tempdir for config paths

---
 pym/portage/tests/dbapi/test_fakedbapi.py |   19 +++++++++++++------
 1 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/pym/portage/tests/dbapi/test_fakedbapi.py b/pym/portage/tests/dbapi/test_fakedbapi.py
index ed24782..d1ea32d 100644
--- a/pym/portage/tests/dbapi/test_fakedbapi.py
+++ b/pym/portage/tests/dbapi/test_fakedbapi.py
@@ -1,6 +1,9 @@
 # Copyright 2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
+import shutil
+import tempfile
+
 from portage.dbapi.virtual import fakedbapi
 from portage.package.ebuild.config import config
 from portage.tests import TestCase
@@ -33,10 +36,14 @@ class TestFakedbapi(TestCase):
 			("virtual/package-manager",             ["virtual/package-manager-0"]),
 		)
 
-		fakedb = fakedbapi(settings=config(config_profile_path=""))
-		for cpv, metadata in packages:
-			fakedb.cpv_inject(cpv, metadata=metadata)
+		tempdir = tempfile.mkdtemp()
+		try:
+			fakedb = fakedbapi(settings=config(config_profile_path="",
+				config_root=tempdir, target_root=tempdir))
+			for cpv, metadata in packages:
+				fakedb.cpv_inject(cpv, metadata=metadata)
 
-		for atom, expected_result in match_tests:
-			result = []
-			self.assertEqual( fakedb.match(atom), expected_result )
+			for atom, expected_result in match_tests:
+				self.assertEqual( fakedb.match(atom), expected_result )
+		finally:
+			shutil.rmtree(tempdir)



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dbapi/
@ 2011-06-11  2:31 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2011-06-11  2:31 UTC (permalink / raw
  To: gentoo-commits

commit:     796d15114b331a11a8528516739f093cdcb6ff6c
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jun 11 02:31:22 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jun 11 02:31:22 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=796d1511

test_fakedbapi: define PORTDIR, test missing IUSE

---
 pym/portage/tests/dbapi/test_fakedbapi.py |   13 +++++++++++--
 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 d1ea32d..a2c5f77 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)
 



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dbapi/
@ 2012-09-08  4:08 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2012-09-08  4:08 UTC (permalink / raw
  To: gentoo-commits

commit:     c35ec6c074f44ffbf7849c54976c91ce5a53e8fe
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Sep  8 04:07:45 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Sep  8 04:07:45 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c35ec6c0

Test portdbapi/egencache cache-formats behavior.

---
 pym/portage/tests/dbapi/test_portdb_cache.py |  178 ++++++++++++++++++++++++++
 1 files changed, 178 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/dbapi/test_portdb_cache.py b/pym/portage/tests/dbapi/test_portdb_cache.py
new file mode 100644
index 0000000..e6d2ba7
--- /dev/null
+++ b/pym/portage/tests/dbapi/test_portdb_cache.py
@@ -0,0 +1,178 @@
+# Copyright 2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+import subprocess
+import sys
+import textwrap
+
+import portage
+from portage import os
+from portage import _unicode_decode
+from portage.const import (BASH_BINARY, PORTAGE_BIN_PATH,
+	PORTAGE_PYM_PATH, USER_CONFIG_PATH)
+from portage.tests import TestCase
+from portage.tests.resolver.ResolverPlayground import ResolverPlayground
+from portage.util import ensure_dirs
+
+class PortdbCacheTestCase(TestCase):
+
+	def testPortdbCache(self):
+		debug = False
+
+		ebuilds = {
+			"dev-libs/A-1": {},
+			"dev-libs/A-2": {},
+			"sys-apps/B-1": {},
+			"sys-apps/B-2": {},
+		}
+
+		playground = ResolverPlayground(ebuilds=ebuilds, debug=debug)
+		settings = playground.settings
+		eprefix = settings["EPREFIX"]
+		portdir = settings["PORTDIR"]
+		user_config_dir = os.path.join(eprefix, USER_CONFIG_PATH)
+		metadata_dir = os.path.join(portdir, "metadata")
+		md5_cache_dir = os.path.join(metadata_dir, "md5-cache")
+		pms_cache_dir = os.path.join(metadata_dir, "cache")
+		layout_conf_path = os.path.join(metadata_dir, "layout.conf")
+
+		portage_python = portage._python_interpreter
+		egencache_cmd = (portage_python, "-Wd",
+			os.path.join(PORTAGE_BIN_PATH, "egencache"))
+		python_cmd = (portage_python, "-Wd", "-c")
+
+		test_commands = (
+			(lambda: not os.path.exists(pms_cache_dir),),
+			(lambda: not os.path.exists(md5_cache_dir),),
+			python_cmd + (textwrap.dedent("""
+				import os, sys, portage
+				if portage.portdb.porttree_root in portage.portdb._pregen_auxdb:
+					sys.exit(1)
+			"""),),
+
+			egencache_cmd + ("--update",),
+			(lambda: os.path.exists(pms_cache_dir),),
+			(lambda: not os.path.exists(md5_cache_dir),),
+			python_cmd + (textwrap.dedent("""
+				import os, sys, portage
+				if portage.portdb.porttree_root not in portage.portdb._pregen_auxdb:
+					sys.exit(1)
+			"""),),
+			python_cmd + (textwrap.dedent("""
+				import os, sys, portage
+				from portage.cache.metadata import database as pms_database
+				if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.porttree_root], pms_database):
+					sys.exit(1)
+			"""),),
+
+			(BASH_BINARY, "-c", "echo %s > %s" %
+				tuple(map(portage._shell_quote,
+				("cache-formats = md5-dict pms", layout_conf_path,)))),
+			egencache_cmd + ("--update",),
+			(lambda: os.path.exists(md5_cache_dir),),
+			python_cmd + (textwrap.dedent("""
+				import os, sys, portage
+				if portage.portdb.porttree_root not in portage.portdb._pregen_auxdb:
+					sys.exit(1)
+			"""),),
+			python_cmd + (textwrap.dedent("""
+				import os, sys, portage
+				from portage.cache.flat_hash import md5_database
+				if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.porttree_root], md5_database):
+					sys.exit(1)
+			"""),),
+
+			(BASH_BINARY, "-c", "echo %s > %s" %
+				tuple(map(portage._shell_quote,
+				("cache-formats = pms md5-dict", layout_conf_path,)))),
+			python_cmd + (textwrap.dedent("""
+				import os, sys, portage
+				if portage.portdb.porttree_root not in portage.portdb._pregen_auxdb:
+					sys.exit(1)
+			"""),),
+			python_cmd + (textwrap.dedent("""
+				import os, sys, portage
+				from portage.cache.metadata import database as pms_database
+				if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.porttree_root], pms_database):
+					sys.exit(1)
+			"""),),
+		)
+
+		features = []
+		if not portage.process.sandbox_capable or \
+			os.environ.get("SANDBOX_ON") == "1":
+			features.append("-sandbox")
+
+		make_conf = (
+			"FEATURES=\"%s\"\n" % (" ".join(features),),
+			"PORTDIR=\"%s\"\n" % (portdir,),
+			"PORTAGE_GRPNAME=\"%s\"\n" % (os.environ["PORTAGE_GRPNAME"],),
+			"PORTAGE_USERNAME=\"%s\"\n" % (os.environ["PORTAGE_USERNAME"],),
+		)
+
+		pythonpath =  os.environ.get("PYTHONPATH")
+		if pythonpath is not None and not pythonpath.strip():
+			pythonpath = None
+		if pythonpath is not None and \
+			pythonpath.split(":")[0] == PORTAGE_PYM_PATH:
+			pass
+		else:
+			if pythonpath is None:
+				pythonpath = ""
+			else:
+				pythonpath = ":" + pythonpath
+			pythonpath = PORTAGE_PYM_PATH + pythonpath
+
+		env = {
+			"PATH" : os.environ.get("PATH", ""),
+			"PORTAGE_OVERRIDE_EPREFIX" : eprefix,
+			"PORTAGE_PYTHON" : portage_python,
+			"PYTHONPATH" : pythonpath,
+		}
+
+		if "__PORTAGE_TEST_HARDLINK_LOCKS" in os.environ:
+			env["__PORTAGE_TEST_HARDLINK_LOCKS"] = \
+				os.environ["__PORTAGE_TEST_HARDLINK_LOCKS"]
+
+		dirs = [user_config_dir]
+
+		try:
+			for d in dirs:
+				ensure_dirs(d)
+			with open(os.path.join(user_config_dir, "make.conf"), 'w') as f:
+				for line in make_conf:
+					f.write(line)
+
+			if debug:
+				# The subprocess inherits both stdout and stderr, for
+				# debugging purposes.
+				stdout = None
+			else:
+				# The subprocess inherits stderr so that any warnings
+				# triggered by python -Wd will be visible.
+				stdout = subprocess.PIPE
+
+			for i, args in enumerate(test_commands):
+
+				if hasattr(args[0], '__call__'):
+					self.assertTrue(args[0](),
+						"callable at index %s failed" % (i,))
+					continue
+
+				proc = subprocess.Popen(args,
+					env=env, stdout=stdout)
+
+				if debug:
+					proc.wait()
+				else:
+					output = proc.stdout.readlines()
+					proc.wait()
+					proc.stdout.close()
+					if proc.returncode != os.EX_OK:
+						for line in output:
+							sys.stderr.write(_unicode_decode(line))
+
+				self.assertEqual(os.EX_OK, proc.returncode,
+					"command failed with args %s" % (args,))
+		finally:
+			playground.cleanup()


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dbapi/
@ 2012-11-27 16:34 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2012-11-27 16:34 UTC (permalink / raw
  To: gentoo-commits

commit:     69c6c8108dbbe08b4ab1220f831a1be296670c85
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 27 16:33:45 2012 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Nov 27 16:33:45 2012 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=69c6c810

test_portdb_cache: use python -Wi

---
 pym/portage/tests/dbapi/test_portdb_cache.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/pym/portage/tests/dbapi/test_portdb_cache.py b/pym/portage/tests/dbapi/test_portdb_cache.py
index 67b961a..b9f9fed 100644
--- a/pym/portage/tests/dbapi/test_portdb_cache.py
+++ b/pym/portage/tests/dbapi/test_portdb_cache.py
@@ -87,12 +87,12 @@ class PortdbCacheTestCase(TestCase):
 			(BASH_BINARY, "-c", "echo %s > %s" %
 				tuple(map(portage._shell_quote,
 				("cache-formats = pms md5-dict", layout_conf_path,)))),
-			(portage_python, "-c") + (textwrap.dedent("""
+			(portage_python, "-Wi", "-c") + (textwrap.dedent("""
 				import os, sys, portage
 				if portage.portdb.porttree_root not in portage.portdb._pregen_auxdb:
 					sys.exit(1)
 			"""),),
-			(portage_python, "-c") + (textwrap.dedent("""
+			(portage_python, "-Wi", "-c") + (textwrap.dedent("""
 				import os, sys, portage
 				from portage.cache.metadata import database as pms_database
 				if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.porttree_root], pms_database):


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dbapi/
@ 2014-12-15 16:28 Arfrever Frehtes Taifersar Arahesis
  0 siblings, 0 replies; 6+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2014-12-15 16:28 UTC (permalink / raw
  To: gentoo-commits

commit:     c953151486b3cf92d931affc7fd3bb0b4fbe1a43
Author:     Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Mon Dec 15 16:26:23 2014 +0000
Commit:     Arfrever Frehtes Taifersar Arahesis <arfrever <AT> apache <DOT> org>
CommitDate: Mon Dec 15 16:26:23 2014 +0000
URL:        http://sources.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=c9531514

portage.tests.dbapi.test_portdb_cache: Delete deprecated code.

9 calls to deprecated portage.repository.config.RepoConfigLoader.mainRepoLocation()
function have been deleted.

---
 pym/portage/tests/dbapi/test_portdb_cache.py | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/pym/portage/tests/dbapi/test_portdb_cache.py b/pym/portage/tests/dbapi/test_portdb_cache.py
index f08d0f8..5ac9b03 100644
--- a/pym/portage/tests/dbapi/test_portdb_cache.py
+++ b/pym/portage/tests/dbapi/test_portdb_cache.py
@@ -47,7 +47,7 @@ class PortdbCacheTestCase(TestCase):
 			(lambda: not os.path.exists(md5_cache_dir),),
 			python_cmd + (textwrap.dedent("""
 				import os, sys, portage
-				if portage.portdb.repositories.mainRepoLocation() in portage.portdb._pregen_auxdb:
+				if portage.portdb.repositories['test_repo'].location in portage.portdb._pregen_auxdb:
 					sys.exit(1)
 			"""),),
 
@@ -56,13 +56,13 @@ class PortdbCacheTestCase(TestCase):
 			(lambda: os.path.exists(md5_cache_dir),),
 			python_cmd + (textwrap.dedent("""
 				import os, sys, portage
-				if portage.portdb.repositories.mainRepoLocation() not in portage.portdb._pregen_auxdb:
+				if portage.portdb.repositories['test_repo'].location not in portage.portdb._pregen_auxdb:
 					sys.exit(1)
 			"""),),
 			python_cmd + (textwrap.dedent("""
 				import os, sys, portage
 				from portage.cache.flat_hash import md5_database
-				if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.repositories.mainRepoLocation()], md5_database):
+				if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.repositories['test_repo'].location], md5_database):
 					sys.exit(1)
 			"""),),
 
@@ -73,13 +73,13 @@ class PortdbCacheTestCase(TestCase):
 			(lambda: os.path.exists(md5_cache_dir),),
 			python_cmd + (textwrap.dedent("""
 				import os, sys, portage
-				if portage.portdb.repositories.mainRepoLocation() not in portage.portdb._pregen_auxdb:
+				if portage.portdb.repositories['test_repo'].location not in portage.portdb._pregen_auxdb:
 					sys.exit(1)
 			"""),),
 			python_cmd + (textwrap.dedent("""
 				import os, sys, portage
 				from portage.cache.flat_hash import md5_database
-				if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.repositories.mainRepoLocation()], md5_database):
+				if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.repositories['test_repo'].location], md5_database):
 					sys.exit(1)
 			"""),),
 
@@ -90,13 +90,13 @@ class PortdbCacheTestCase(TestCase):
 				("cache-formats = pms md5-dict", layout_conf_path,)))),
 			(portage_python, "-b", "-Wd", "-Wi::DeprecationWarning", "-c") + (textwrap.dedent("""
 				import os, sys, portage
-				if portage.portdb.repositories.mainRepoLocation() not in portage.portdb._pregen_auxdb:
+				if portage.portdb.repositories['test_repo'].location not in portage.portdb._pregen_auxdb:
 					sys.exit(1)
 			"""),),
 			(portage_python, "-b", "-Wd", "-Wi::DeprecationWarning", "-c") + (textwrap.dedent("""
 				import os, sys, portage
 				from portage.cache.metadata import database as pms_database
-				if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.repositories.mainRepoLocation()], pms_database):
+				if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.repositories['test_repo'].location], pms_database):
 					sys.exit(1)
 			"""),),
 
@@ -105,13 +105,13 @@ class PortdbCacheTestCase(TestCase):
 			(BASH_BINARY, "-c", "rm %s" % portage._shell_quote(layout_conf_path)),
 			python_cmd + (textwrap.dedent("""
 				import os, sys, portage
-				if portage.portdb.repositories.mainRepoLocation() not in portage.portdb._pregen_auxdb:
+				if portage.portdb.repositories['test_repo'].location not in portage.portdb._pregen_auxdb:
 					sys.exit(1)
 			"""),),
 			python_cmd + (textwrap.dedent("""
 				import os, sys, portage
 				from portage.cache.flat_hash import md5_database
-				if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.repositories.mainRepoLocation()], md5_database):
+				if not isinstance(portage.portdb._pregen_auxdb[portage.portdb.repositories['test_repo'].location], md5_database):
 					sys.exit(1)
 			"""),),
 		)


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2014-12-15 16:28 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-11  2:09 [gentoo-commits] proj/portage:master commit in: pym/portage/tests/dbapi/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2011-06-11  2:17 Zac Medico
2011-06-11  2:31 Zac Medico
2012-09-08  4:08 Zac Medico
2012-11-27 16:34 Zac Medico
2014-12-15 16:28 Arfrever Frehtes Taifersar Arahesis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox