aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-11 22:35:14 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-06-11 22:35:32 +0100
commitc8c5434b8587ac54c1da2d3510962fe5005db845 (patch)
tree29b174adbebc95a9b527d2aebf2cba963a5acc7f /python
parente27dabb7c338116b1f496d09d51c6869e298e043 (diff)
downloadpaludis-c8c5434b8587ac54c1da2d3510962fe5005db845.tar.gz
paludis-c8c5434b8587ac54c1da2d3510962fe5005db845.tar.xz
Remove VirtualsInterface
Diffstat (limited to 'python')
-rwxr-xr-xpython/environment_TEST.py8
-rwxr-xr-xpython/mask_TEST.py16
-rwxr-xr-xpython/package_id_TEST.py8
-rw-r--r--python/repository.cc21
-rwxr-xr-xpython/repository_TEST.py4
5 files changed, 0 insertions, 57 deletions
diff --git a/python/environment_TEST.py b/python/environment_TEST.py
index a9e62d697..c81b01fdd 100755
--- a/python/environment_TEST.py
+++ b/python/environment_TEST.py
@@ -80,14 +80,6 @@ class TestCase_01_Environments(unittest.TestCase):
self.assertRaises(NoSuchPackageError, self.e.fetch_unique_qualified_package_name, "bar",
Filter.SupportsUninstallAction())
- def test_26_repositories(self):
- if os.environ.get("PALUDIS_ENABLE_VIRTUALS_REPOSITORY") == "yes":
- self.assert_(self.e.more_important_than("testrepo", "virtuals"))
- self.assert_(not self.e.more_important_than("virtuals", "testrepo"))
- self.assertRaises(NoSuchRepositoryError, self.e.fetch_repository, "blah")
-
- self.assertEqual(len(list(self.e.repositories)), 3)
-
class TestCase_03_TestEnvironment(unittest.TestCase):
def test_01_create(self):
e = TestEnvironment()
diff --git a/python/mask_TEST.py b/python/mask_TEST.py
index f38a2dad3..e9f722114 100755
--- a/python/mask_TEST.py
+++ b/python/mask_TEST.py
@@ -86,22 +86,6 @@ class TestCase_01_Masks(unittest.TestCase):
self.assertEquals(m.description(), "eapi")
self.assertEquals(m.explanation(), "Unsupported EAPI 'unsupported'")
- def test_05_association_mask(self):
- if os.environ.get("PALUDIS_ENABLE_VIRTUALS_REPOSITORY") == "yes":
- q = Selection.RequireExactlyOne(Generator.Matches(
- parse_user_package_dep_spec("=virtual/association-1.0", self.e, []), []))
- pid = iter(self.e[q]).next()
- m = iter(pid.masks).next()
-
- self.assert_(isinstance(m, Mask))
- self.assert_(isinstance(m, AssociationMask))
-
- self.assertEquals(m.key(), "A")
- self.assertEquals(m.description(), "by association")
- self.assertEquals(m.associated_package_spec().package, "masked/repo")
- elif os.environ.get("PALUDIS_ENABLE_VIRTUALS_REPOSITORY") != "no":
- raise "oops"
-
class TestCase_02_Masks_subclassing(unittest.TestCase):
def test_01_user_mask(self):
class TestUserMask(UserMask):
diff --git a/python/package_id_TEST.py b/python/package_id_TEST.py
index b85b52b7b..620f78d8b 100755
--- a/python/package_id_TEST.py
+++ b/python/package_id_TEST.py
@@ -33,8 +33,6 @@ class TestCase_01_PackageID(unittest.TestCase):
self.e = NoConfigEnvironment(repo_path, "/var/empty")
self.ie = NoConfigEnvironment(irepo_path)
self.pid = iter(self.e.fetch_repository("testrepo").package_ids("foo/bar", [])).next()
- if os.environ.get("PALUDIS_ENABLE_VIRTUALS_REPOSITORY") == "yes":
- self.vpid = iter(self.e.fetch_repository("virtuals").package_ids("virtual/bar", [])).next()
self.ipid = iter(self.ie.fetch_repository("installed").package_ids("cat-one/pkg-one", [])).next()
self.mpid = iter(self.e.fetch_repository("testrepo").package_ids("cat/masked", [])).next()
@@ -106,12 +104,6 @@ class TestCase_01_PackageID(unittest.TestCase):
mask = iter(self.mpid.masks).next()
self.assert_(isinstance(mask, UnacceptedMask))
- def test_14_virtual_for_key(self):
- if os.environ.get("PALUDIS_ENABLE_VIRTUALS_REPOSITORY") == "yes":
- self.assertEquals(self.vpid.virtual_for_key().parse_value(), self.pid)
- self.assertEquals(self.pid.virtual_for_key(), None)
- self.assertEquals(self.ipid.virtual_for_key(), None)
-
def test_15_provide_key(self):
self.assert_(isinstance(self.pid.provide_key(), MetadataProvideSpecTreeKey))
self.assertEquals(self.ipid.provide_key(), None)
diff --git a/python/repository.cc b/python/repository.cc
index 25e8821be..17df1b104 100644
--- a/python/repository.cc
+++ b/python/repository.cc
@@ -47,12 +47,6 @@ struct RepositoryWrapper :
return self.environment_variable_interface();
}
- static RepositoryVirtualsInterface *
- get_virtuals_interface(const Repository & self)
- {
- return self.virtuals_interface();
- }
-
static RepositoryDestinationInterface *
get_destination_interface(const Repository & self)
{
@@ -172,11 +166,6 @@ void expose_repository()
"[ro] RepositoryEnvironmentInterface"
)
- .add_property("virtuals_interface", bp::make_function(&RepositoryWrapper::get_virtuals_interface,
- bp::return_internal_reference<>()),
- "[ro] RepositoryVirtualsInterface"
- )
-
.add_property("destination_interface", bp::make_function(&RepositoryWrapper::get_destination_interface,
bp::return_internal_reference<>()),
"[ro] RepositoryDestinationInterface"
@@ -218,16 +207,6 @@ void expose_repository()
);
/**
- * RepositoryVirtualsInterface
- */
- bp::class_<RepositoryVirtualsInterface, boost::noncopyable>
- (
- "RepositoryVirtualsInterface",
- "Interface for repositories that define virtuals.",
- bp::no_init
- );
-
- /**
* RepositoryDestinationInterface
*/
bp::class_<RepositoryDestinationInterface, boost::noncopyable>
diff --git a/python/repository_TEST.py b/python/repository_TEST.py
index 101282cbb..4cb9d3bd4 100755
--- a/python/repository_TEST.py
+++ b/python/repository_TEST.py
@@ -110,10 +110,6 @@ class TestCase_02_RepositoryInterfaces(unittest.TestCase):
evi = repo.environment_variable_interface
self.assert_(isinstance(evi, RepositoryEnvironmentVariableInterface))
- def test_09_virtuals_interface(self):
- vi = repo.virtuals_interface
- self.assert_(isinstance(vi, RepositoryVirtualsInterface))
-
def test_10_destination_interface(self):
di = irepo.destination_interface
self.assert_(isinstance(di, RepositoryDestinationInterface))