aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-03-30 19:44:19 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-03-30 19:51:30 +0100
commit5875fdad16d2a2918b924441065476e4a8b84c51 (patch)
tree5e92f25c514b8e7e62df0a5cc5aec0bda80d9e98
parent4209f97594ecf3f4f965f1fd7fa9236afff4a0af (diff)
downloadpaludis-5875fdad16d2a2918b924441065476e4a8b84c51.tar.gz
paludis-5875fdad16d2a2918b924441065476e4a8b84c51.tar.xz
(python) PackageID::choices_key
-rw-r--r--python/package_id.cc4
-rwxr-xr-xpython/package_id_TEST.py3
2 files changed, 7 insertions, 0 deletions
diff --git a/python/package_id.cc b/python/package_id.cc
index 2bc5886..2c08a51 100644
--- a/python/package_id.cc
+++ b/python/package_id.cc
@@ -202,6 +202,10 @@ void expose_package_id()
"The slot_key, if not None, indicates the package's slot."
)
+ .def("choices_key", &PackageID::choices_key,
+ "The choices_key, if not None, indicates the package's choices."
+ )
+
.def("__eq__", &py_eq<PackageID>)
.def("__ne__", &py_ne<PackageID>)
diff --git a/python/package_id_TEST.py b/python/package_id_TEST.py
index c9d482d..c2df8fb 100755
--- a/python/package_id_TEST.py
+++ b/python/package_id_TEST.py
@@ -177,6 +177,9 @@ class TestCase_01_PackageID(unittest.TestCase):
self.assert_(isinstance(self.ipid.fs_location_key(), MetadataFSEntryKey))
self.assert_(isinstance(self.ipid.fs_location_key(), MetadataFSEntryKey))
+ def test_31_choices_key(self):
+ self.assert_(isinstance(self.pid.choices_key().value(), Choices))
+
if __name__ == "__main__":
unittest.main()