aboutsummaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-12 14:28:03 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2011-04-12 14:45:22 +0100
commit120c58323950219e16d8fe22693af221d2887f9b (patch)
tree2df48534abea1af807750dbbd0ce3ac9922bd44b /python
parent271074eb112e276d5ba25f91785431911ee3443f (diff)
downloadpaludis-120c58323950219e16d8fe22693af221d2887f9b.tar.gz
paludis-120c58323950219e16d8fe22693af221d2887f9b.tar.xz
MetadataKey value -> parse_value
Diffstat (limited to 'python')
-rw-r--r--python/additional_tests.cc16
-rw-r--r--python/choices_TEST.py6
-rwxr-xr-xpython/contents_TEST.py14
-rw-r--r--python/metadata_key.cc110
-rwxr-xr-xpython/metadata_key_TEST.py26
-rwxr-xr-xpython/package_id_TEST.py22
-rwxr-xr-xpython/repository_TEST.py4
7 files changed, 99 insertions, 99 deletions
diff --git a/python/additional_tests.cc b/python/additional_tests.cc
index 68e08bf0b..6f906dac5 100644
--- a/python/additional_tests.cc
+++ b/python/additional_tests.cc
@@ -138,13 +138,13 @@ namespace metadata_key
void test_metadata_package_id_key(const MetadataValueKey<std::shared_ptr<const PackageID> > & m)
{
test_metadata_key(m);
- m.value();
+ m.parse_value();
}
void test_metadata_string_key(const MetadataValueKey<std::string> & m)
{
test_metadata_key(m);
- m.value();
+ m.parse_value();
}
void test_metadata_section_key(const MetadataSectionKey & m)
@@ -157,40 +157,40 @@ namespace metadata_key
void test_metadata_time_key(const MetadataTimeKey & m)
{
test_metadata_key(m);
- Timestamp PALUDIS_ATTRIBUTE((unused)) t(m.value());
+ Timestamp PALUDIS_ATTRIBUTE((unused)) t(m.parse_value());
}
void test_metadata_contents_key(const MetadataValueKey<std::shared_ptr<const Contents> > & m)
{
test_metadata_key(m);
- m.value();
+ m.parse_value();
}
void test_metadata_choices_key(const MetadataValueKey<std::shared_ptr<const Choices> > & m)
{
test_metadata_key(m);
- m.value();
+ m.parse_value();
}
template <typename C_>
void test_metadata_set_key(const MetadataCollectionKey<C_> & m)
{
test_metadata_key(m);
- m.value();
+ m.parse_value();
}
template <typename C_>
void test_metadata_spec_tree_key(const MetadataSpecTreeKey<C_> & m)
{
test_metadata_key(m);
- m.value();
+ m.parse_value();
}
template <>
void test_metadata_spec_tree_key(const MetadataSpecTreeKey<FetchableURISpecTree> & m)
{
test_metadata_key(m);
- m.value();
+ m.parse_value();
m.initial_label();
}
}
diff --git a/python/choices_TEST.py b/python/choices_TEST.py
index ad69d1f64..7e9f9476f 100644
--- a/python/choices_TEST.py
+++ b/python/choices_TEST.py
@@ -33,7 +33,7 @@ class TestCase_01_Choices(unittest.TestCase):
def setUp(self):
self.e = NoConfigEnvironment(repo_path, "/var/empty")
self.pid = iter(self.e.fetch_repository("testrepo").package_ids("foo/bar", [])).next()
- self.choices = self.pid.find_metadata("PALUDIS_CHOICES").value()
+ self.choices = self.pid.find_metadata("PALUDIS_CHOICES").parse_value()
def test_01_choices(self):
self.assert_(isinstance(self.choices, Choices), self.choices.__class__)
@@ -59,7 +59,7 @@ class TestCase_02_Choice(unittest.TestCase):
def setUp(self):
self.e = NoConfigEnvironment(repo_path, "/var/empty")
self.pid = iter(self.e.fetch_repository("testrepo").package_ids("foo/bar", [])).next()
- self.choices = self.pid.find_metadata("PALUDIS_CHOICES").value()
+ self.choices = self.pid.find_metadata("PALUDIS_CHOICES").parse_value()
self.use = None
self.linguas = None
for f in self.choices:
@@ -108,7 +108,7 @@ class TestCase_03_ChoiceValue(unittest.TestCase):
def setUp(self):
self.e = NoConfigEnvironment(repo_path, "/var/empty")
self.pid = iter(self.e.fetch_repository("testrepo").package_ids("foo/bar", [])).next()
- self.choices = self.pid.find_metadata("PALUDIS_CHOICES").value()
+ self.choices = self.pid.find_metadata("PALUDIS_CHOICES").parse_value()
self.use_testflag = self.choices.find_by_name_with_prefix("testflag")
self.linguas_en = self.choices.find_by_name_with_prefix("linguas_en")
diff --git a/python/contents_TEST.py b/python/contents_TEST.py
index 6cadb9b3d..3e2c49bfb 100755
--- a/python/contents_TEST.py
+++ b/python/contents_TEST.py
@@ -29,26 +29,26 @@ class TestCase_Contents(unittest.TestCase):
e = ContentsFileEntry("/foo")
self.assert_(isinstance(e, ContentsEntry))
- self.assertEquals(e.location_key().value(), "/foo")
+ self.assertEquals(e.location_key().parse_value(), "/foo")
def test_03_dir_entry(self):
e = ContentsDirEntry("/foo")
self.assert_(isinstance(e, ContentsEntry))
- self.assertEquals(e.location_key().value(), "/foo")
+ self.assertEquals(e.location_key().parse_value(), "/foo")
def test_04_other_entry(self):
e = ContentsOtherEntry("/foo")
self.assert_(isinstance(e, ContentsEntry))
- self.assertEquals(e.location_key().value(), "/foo")
+ self.assertEquals(e.location_key().parse_value(), "/foo")
def test_07_sym_entry(self):
e = ContentsSymEntry("/foo", "/blah")
self.assert_(isinstance(e, ContentsEntry))
- self.assertEquals(e.location_key().value(), "/foo")
- self.assertEquals(e.target_key().value(), "/blah")
+ self.assertEquals(e.location_key().parse_value(), "/foo")
+ self.assertEquals(e.target_key().parse_value(), "/blah")
def test_08_contents(self):
entries = []
@@ -62,10 +62,10 @@ class TestCase_Contents(unittest.TestCase):
c.add(entry)
for (i, entry) in enumerate(c):
- self.assertEquals(entry.location_key().value(), entries[i].location_key().value())
+ self.assertEquals(entry.location_key().parse_value(), entries[i].location_key().parse_value())
self.assertEquals(type(entry), type(entries[i]))
if i==0:
- self.assertEquals(entry.target_key().value(), entries[i].target_key().value())
+ self.assertEquals(entry.target_key().parse_value(), entries[i].target_key().parse_value())
if i>3:
self.assertEquals("TOO MANY ENTRIES", "OK")
diff --git a/python/metadata_key.cc b/python/metadata_key.cc
index 6d2aa5710..6a2dc0e10 100644
--- a/python/metadata_key.cc
+++ b/python/metadata_key.cc
@@ -181,15 +181,15 @@ struct MetadataPackageIDKeyWrapper :
MetadataValueKey<std::shared_ptr<const PackageID> > ,
bp::wrapper<MetadataValueKey<std::shared_ptr<const PackageID> > >
{
- virtual const std::shared_ptr<const PackageID> value() const
+ virtual const std::shared_ptr<const PackageID> parse_value() const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
Lock l(get_mutex());
- if (bp::override f = get_override("value"))
+ if (bp::override f = get_override("parse_value"))
return f();
else
- throw PythonMethodNotImplemented("MetadataPackageIDKey", "value");
+ throw PythonMethodNotImplemented("MetadataPackageIDKey", "parse_value");
}
virtual const std::string raw_name() const
@@ -234,15 +234,15 @@ struct MetadataStringKeyWrapper :
MetadataValueKey<std::string> ,
bp::wrapper<MetadataValueKey<std::string> >
{
- virtual const std::string value() const
+ virtual const std::string parse_value() const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
Lock l(get_mutex());
- if (bp::override f = get_override("value"))
+ if (bp::override f = get_override("parse_value"))
return f();
else
- throw PythonMethodNotImplemented("MetadataStringKey", "value");
+ throw PythonMethodNotImplemented("MetadataStringKey", "parse_value");
}
virtual const std::string raw_name() const
@@ -280,15 +280,15 @@ struct MetadataSlotNameKeyWrapper :
MetadataValueKey<SlotName> ,
bp::wrapper<MetadataValueKey<SlotName> >
{
- virtual const SlotName value() const
+ virtual const SlotName parse_value() const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
Lock l(get_mutex());
- if (bp::override f = get_override("value"))
+ if (bp::override f = get_override("parse_value"))
return f();
else
- throw PythonMethodNotImplemented("MetadataSlotNameKey", "value");
+ throw PythonMethodNotImplemented("MetadataSlotNameKey", "parse_value");
}
virtual const std::string raw_name() const
@@ -391,15 +391,15 @@ struct MetadataTimeKeyWrapper :
MetadataTimeKey,
bp::wrapper<MetadataTimeKey>
{
- virtual Timestamp value() const
+ virtual Timestamp parse_value() const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
Lock l(get_mutex());
- if (bp::override f = get_override("value"))
+ if (bp::override f = get_override("parse_value"))
return Timestamp(f(), 0);
else
- throw PythonMethodNotImplemented("MetadataTimeKey", "value");
+ throw PythonMethodNotImplemented("MetadataTimeKey", "parse_value");
}
virtual const std::string raw_name() const
@@ -437,15 +437,15 @@ struct MetadataContentsKeyWrapper :
MetadataValueKey<std::shared_ptr<const Contents> > ,
bp::wrapper<MetadataValueKey<std::shared_ptr<const Contents> > >
{
- virtual const std::shared_ptr<const Contents> value() const
+ virtual const std::shared_ptr<const Contents> parse_value() const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
Lock l(get_mutex());
- if (bp::override f = get_override("value"))
+ if (bp::override f = get_override("parse_value"))
return f();
else
- throw PythonMethodNotImplemented("MetadataContentsKey", "value");
+ throw PythonMethodNotImplemented("MetadataContentsKey", "parse_value");
}
virtual const std::string raw_name() const
@@ -483,15 +483,15 @@ struct MetadataChoicesKeyWrapper :
MetadataValueKey<std::shared_ptr<const Choices> > ,
bp::wrapper<MetadataValueKey<std::shared_ptr<const Choices> > >
{
- virtual const std::shared_ptr<const Choices> value() const
+ virtual const std::shared_ptr<const Choices> parse_value() const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
Lock l(get_mutex());
- if (bp::override f = get_override("value"))
+ if (bp::override f = get_override("parse_value"))
return f();
else
- throw PythonMethodNotImplemented("MetadataChoicesKey", "value");
+ throw PythonMethodNotImplemented("MetadataChoicesKey", "parse_value");
}
virtual const std::string raw_name() const
@@ -529,15 +529,15 @@ struct MetadataFSPathKeyWrapper :
MetadataValueKey<FSPath> ,
bp::wrapper<MetadataValueKey<FSPath> >
{
- virtual const FSPath value() const
+ virtual const FSPath parse_value() const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
Lock l(get_mutex());
- if (bp::override f = get_override("value"))
+ if (bp::override f = get_override("parse_value"))
return f();
else
- throw PythonMethodNotImplemented("MetadataValueKey<FSPath> ", "value");
+ throw PythonMethodNotImplemented("MetadataValueKey<FSPath> ", "parse_value");
}
virtual const std::string raw_name() const
@@ -576,15 +576,15 @@ struct MetadataCollectionKeyWrapper :
MetadataCollectionKey<C_>,
bp::wrapper<MetadataCollectionKey<C_> >
{
- virtual const std::shared_ptr<const C_> value() const
+ virtual const std::shared_ptr<const C_> parse_value() const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
Lock l(get_mutex());
- if (bp::override f = this->get_override("value"))
+ if (bp::override f = this->get_override("parse_value"))
return f();
else
- throw PythonMethodNotImplemented("MetadataCollectionKey", "value");
+ throw PythonMethodNotImplemented("MetadataCollectionKey", "parse_value");
}
virtual const std::string raw_name() const
@@ -630,15 +630,15 @@ struct MetadataSpecTreeKeyWrapper :
MetadataSpecTreeKey<C_>,
bp::wrapper<MetadataSpecTreeKey<C_> >
{
- virtual const std::shared_ptr<const C_> value() const
+ virtual const std::shared_ptr<const C_> parse_value() const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
Lock l(get_mutex());
- if (bp::override f = this->get_override("value"))
+ if (bp::override f = this->get_override("parse_value"))
return f();
else
- throw PythonMethodNotImplemented("MetadataSpecTreeKey", "value");
+ throw PythonMethodNotImplemented("MetadataSpecTreeKey", "parse_value");
}
virtual const std::string raw_name() const
@@ -684,15 +684,15 @@ struct MetadataSpecTreeKeyWrapper<FetchableURISpecTree> :
MetadataSpecTreeKey<FetchableURISpecTree>,
bp::wrapper<MetadataSpecTreeKey<FetchableURISpecTree> >
{
- virtual const std::shared_ptr<const FetchableURISpecTree> value() const
+ virtual const std::shared_ptr<const FetchableURISpecTree> parse_value() const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
Lock l(get_mutex());
- if (bp::override f = this->get_override("value"))
+ if (bp::override f = this->get_override("parse_value"))
return f();
else
- throw PythonMethodNotImplemented("MetadataSpecTreeKey", "value");
+ throw PythonMethodNotImplemented("MetadataSpecTreeKey", "parse_value");
}
virtual const std::shared_ptr<const URILabel> initial_label() const
@@ -749,15 +749,15 @@ struct MetadataSpecTreeKeyWrapper<DependencySpecTree> :
MetadataSpecTreeKey<DependencySpecTree>,
bp::wrapper<MetadataSpecTreeKey<DependencySpecTree> >
{
- virtual const std::shared_ptr<const DependencySpecTree> value() const
+ virtual const std::shared_ptr<const DependencySpecTree> parse_value() const
PALUDIS_ATTRIBUTE((warn_unused_result))
{
Lock l(get_mutex());
- if (bp::override f = this->get_override("value"))
+ if (bp::override f = this->get_override("parse_value"))
return f();
else
- throw PythonMethodNotImplemented("MetadataSpecTreeKey", "value");
+ throw PythonMethodNotImplemented("MetadataSpecTreeKey", "parse_value");
}
virtual const std::shared_ptr<const DependenciesLabelSequence> initial_labels() const
@@ -831,8 +831,8 @@ struct class_set_key :
bp::implicitly_convertible<std::shared_ptr<MetadataCollectionKeyWrapper<C_> >,
std::shared_ptr<MetadataKey> >();
- def("value", bp::pure_virtual(&MetadataCollectionKey<C_>::value),
- ("value() -> " + set + "\n"
+ def("parse_value", bp::pure_virtual(&MetadataCollectionKey<C_>::parse_value),
+ ("parse_value() -> " + set + "\n"
"Fetch our value.").c_str()
);
}
@@ -860,8 +860,8 @@ struct class_spec_tree_key :
bp::implicitly_convertible<std::shared_ptr<MetadataSpecTreeKeyWrapper<C_> >,
std::shared_ptr<MetadataKey> >();
- def("value", bp::pure_virtual(&MetadataSpecTreeKey<C_>::value),
- ("value() -> " + spec_tree + "\n"
+ def("parse_value", bp::pure_virtual(&MetadataSpecTreeKey<C_>::parse_value),
+ ("parse_value() -> " + spec_tree + "\n"
"Fetch our value").c_str()
);
}
@@ -891,8 +891,8 @@ struct class_spec_tree_key<FetchableURISpecTree> :
bp::implicitly_convertible<std::shared_ptr<MetadataSpecTreeKeyWrapper<FetchableURISpecTree> >,
std::shared_ptr<MetadataKey> >();
- def("value", bp::pure_virtual(&MetadataSpecTreeKey<FetchableURISpecTree>::value),
- ("value() -> " + spec_tree + "\n"
+ def("parse_value", bp::pure_virtual(&MetadataSpecTreeKey<FetchableURISpecTree>::parse_value),
+ ("parse_value() -> " + spec_tree + "\n"
"Fetch our value").c_str()
);
@@ -928,8 +928,8 @@ struct class_spec_tree_key<DependencySpecTree> :
bp::implicitly_convertible<std::shared_ptr<MetadataSpecTreeKeyWrapper<DependencySpecTree> >,
std::shared_ptr<MetadataKey> >();
- def("value", bp::pure_virtual(&MetadataSpecTreeKey<DependencySpecTree>::value),
- ("value() -> " + spec_tree + "\n"
+ def("parse_value", bp::pure_virtual(&MetadataSpecTreeKey<DependencySpecTree>::parse_value),
+ ("parse_value() -> " + spec_tree + "\n"
"Fetch our value").c_str()
);
@@ -1012,8 +1012,8 @@ void expose_metadata_key()
"__init__()"
)
)
- .def("value", bp::pure_virtual(&MetadataValueKey<std::shared_ptr<const PackageID> > ::value),
- "value() -> PackageID\n"
+ .def("parse_value", bp::pure_virtual(&MetadataValueKey<std::shared_ptr<const PackageID> > ::parse_value),
+ "parse_value() -> PackageID\n"
"Fetch our value."
)
;
@@ -1036,8 +1036,8 @@ void expose_metadata_key()
"__init__()"
)
)
- .def("value", bp::pure_virtual(&MetadataValueKey<std::string> ::value),
- "value() -> string\n"
+ .def("parse_value", bp::pure_virtual(&MetadataValueKey<std::string> ::parse_value),
+ "parse_value() -> string\n"
"Fetch our value."
)
;
@@ -1060,8 +1060,8 @@ void expose_metadata_key()
"__init__()"
)
)
- .def("value", bp::pure_virtual(&MetadataValueKey<SlotName> ::value),
- "value() -> SlotName\n"
+ .def("parse_value", bp::pure_virtual(&MetadataValueKey<SlotName> ::parse_value),
+ "parse_value() -> SlotName\n"
"Fetch our value."
)
;
@@ -1112,8 +1112,8 @@ void expose_metadata_key()
"__init__()"
)
)
- .def("value", bp::pure_virtual(&MetadataTimeKey::value),
- "value() -> int\n"
+ .def("parse_value", bp::pure_virtual(&MetadataTimeKey::parse_value),
+ "parse_value() -> int\n"
"Fetch our value."
)
;
@@ -1135,8 +1135,8 @@ void expose_metadata_key()
"__init__()"
)
)
- .def("value", bp::pure_virtual(&MetadataValueKey<FSPath> ::value),
- "value() -> FSPath\n"
+ .def("parse_value", bp::pure_virtual(&MetadataValueKey<FSPath> ::parse_value),
+ "parse_value() -> FSPath\n"
"Fetch our value."
)
;
@@ -1158,8 +1158,8 @@ void expose_metadata_key()
"__init__()"
)
)
- .def("value", bp::pure_virtual(&MetadataValueKey<std::shared_ptr<const Contents> > ::value),
- "value() -> Contents\n"
+ .def("parse_value", bp::pure_virtual(&MetadataValueKey<std::shared_ptr<const Contents> > ::parse_value),
+ "parse_value() -> Contents\n"
"Fetch our value."
)
@@ -1199,8 +1199,8 @@ void expose_metadata_key()
"__init__()"
)
)
- .def("value", bp::pure_virtual(&MetadataValueKey<std::shared_ptr<const Choices> > ::value),
- "value() -> Choices\n"
+ .def("parse_value", bp::pure_virtual(&MetadataValueKey<std::shared_ptr<const Choices> > ::parse_value),
+ "parse_value() -> Choices\n"
"Fetch our value."
)
diff --git a/python/metadata_key_TEST.py b/python/metadata_key_TEST.py
index b428a3081..f5fbbb60a 100755
--- a/python/metadata_key_TEST.py
+++ b/python/metadata_key_TEST.py
@@ -71,7 +71,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
def __init__(self):
MetadataPackageIDKey.__init__(self)
- def value(self):
+ def parse_value(self):
e = NoConfigEnvironment(repo_path, "/var/empty")
pid = iter(e.fetch_repository("testrepo").package_ids("foo/bar", [])).next()
return pid
@@ -92,7 +92,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
def __init__(self):
MetadataStringKey.__init__(self)
- def value(self):
+ def parse_value(self):
return "str"
def raw_name(self):
@@ -111,7 +111,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
def __init__(self):
MetadataTimeKey.__init__(self)
- def value(self):
+ def parse_value(self):
return 123
def raw_name(self):
@@ -131,7 +131,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
def __init__(self):
MetadataContentsKey.__init__(self)
- def value(self):
+ def parse_value(self):
return Contents()
def raw_name(self):
@@ -150,7 +150,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
def __init__(self):
MetadataKeywordNameIterableKey.__init__(self)
- def value(self):
+ def parse_value(self):
return ["keyword"]
def pretty_print_flat(self, f):
@@ -173,7 +173,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
def __init__(self):
MetadataStringIterableKey.__init__(self)
- def value(self):
+ def parse_value(self):
return ["string"]
def pretty_print_flat(self, f):
@@ -195,7 +195,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
def __init__(self):
MetadataLicenseSpecTreeKey.__init__(self)
- def value(self):
+ def parse_value(self):
return AllDepSpec()
def pretty_print(self, f):
@@ -225,7 +225,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
MetadataProvideSpecTreeKey.__init__(self)
self.e = NoConfigEnvironment(repo_path, "/var/empty")
- def value(self):
+ def parse_value(self):
return AllDepSpec()
def pretty_print(self, f):
@@ -253,7 +253,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
self.e = NoConfigEnvironment(repo_path, "/var/empty")
MetadataDependencySpecTreeKey.__init__(self)
- def value(self):
+ def parse_value(self):
return AllDepSpec()
def pretty_print(self, f):
@@ -281,7 +281,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
def __init__(self):
MetadataPlainTextSpecTreeKey.__init__(self)
- def value(self):
+ def parse_value(self):
return AllDepSpec()
def pretty_print(self, f):
@@ -310,7 +310,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
def __init__(self):
MetadataFetchableURISpecTreeKey.__init__(self)
- def value(self):
+ def parse_value(self):
return AllDepSpec()
def pretty_print(self, f):
@@ -342,7 +342,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
def __init__(self):
MetadataSimpleURISpecTreeKey.__init__(self)
- def value(self):
+ def parse_value(self):
return AllDepSpec()
def pretty_print(self, f):
@@ -393,7 +393,7 @@ class TestCase_02_MetadataKeys_suclassing(unittest.TestCase):
def __init__(self):
MetadataChoicesKey.__init__(self)
- def value(self):
+ def parse_value(self):
return Choices()
def raw_name(self):
diff --git a/python/package_id_TEST.py b/python/package_id_TEST.py
index 4982b5ee3..d274c9e22 100755
--- a/python/package_id_TEST.py
+++ b/python/package_id_TEST.py
@@ -50,8 +50,8 @@ class TestCase_01_PackageID(unittest.TestCase):
self.assertEquals(self.ipid.version, VersionSpec("1"))
def test_04_slot(self):
- self.assertEquals(str(self.ipid.slot_key().value()), "test_slot")
- self.assertEquals(str(self.pid.slot_key().value()), "0")
+ self.assertEquals(str(self.ipid.slot_key().parse_value()), "test_slot")
+ self.assertEquals(str(self.pid.slot_key().parse_value()), "0")
def test_05_repository(self):
self.assertEquals(str(self.pid.repository_name), "testrepo")
@@ -59,8 +59,8 @@ class TestCase_01_PackageID(unittest.TestCase):
def test_07_canonical_form(self):
# Load the metadata
- self.pid.slot_key().value
- self.ipid.slot_key().value
+ self.pid.slot_key().parse_value
+ self.ipid.slot_key().parse_value
self.assertEquals(self.pid.canonical_form(PackageIDCanonicalForm.FULL), "foo/bar-1.0:0::testrepo")
self.assertEquals(self.pid.canonical_form(PackageIDCanonicalForm.VERSION), "1.0")
@@ -74,8 +74,8 @@ class TestCase_01_PackageID(unittest.TestCase):
def test_08_str(self):
# Load the metadata
- self.pid.slot_key().value
- self.ipid.slot_key().value
+ self.pid.slot_key().parse_value
+ self.ipid.slot_key().parse_value
self.assertEquals(str(self.pid), "foo/bar-1.0:0::testrepo")
self.assertEquals(str(self.ipid), "cat-one/pkg-one-1:test_slot::installed")
@@ -108,7 +108,7 @@ class TestCase_01_PackageID(unittest.TestCase):
def test_14_virtual_for_key(self):
if os.environ.get("PALUDIS_ENABLE_VIRTUALS_REPOSITORY") == "yes":
- self.assertEquals(self.vpid.virtual_for_key().value(), self.pid)
+ 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)
@@ -149,8 +149,8 @@ class TestCase_01_PackageID(unittest.TestCase):
self.assertEquals(self.ipid.homepage_key(), None)
def test_24_short_description_key(self):
- self.assertEquals(self.pid.short_description_key().value(), "Test package")
- self.assertEquals(self.ipid.short_description_key().value(), "a description")
+ self.assertEquals(self.pid.short_description_key().parse_value(), "Test package")
+ self.assertEquals(self.ipid.short_description_key().parse_value(), "a description")
def test_25_long_description_key(self):
self.assertEquals(self.pid.long_description_key(), None)
@@ -166,14 +166,14 @@ class TestCase_01_PackageID(unittest.TestCase):
def test_28_from_repositories_key(self):
self.assertEquals(self.pid.from_repositories_key(), None)
- self.assertEquals(iter(self.ipid.from_repositories_key().value()).next(), "origin_test")
+ self.assertEquals(iter(self.ipid.from_repositories_key().parse_value()).next(), "origin_test")
def test_30_fs_location_key(self):
self.assert_(isinstance(self.ipid.fs_location_key(), MetadataFSPathKey))
self.assert_(isinstance(self.ipid.fs_location_key(), MetadataFSPathKey))
def test_31_choices_key(self):
- self.assert_(isinstance(self.pid.choices_key().value(), Choices))
+ self.assert_(isinstance(self.pid.choices_key().parse_value(), Choices))
if __name__ == "__main__":
diff --git a/python/repository_TEST.py b/python/repository_TEST.py
index 7c9ebfc81..85d82b7e1 100755
--- a/python/repository_TEST.py
+++ b/python/repository_TEST.py
@@ -93,9 +93,9 @@ class TestCase_01_Repository(unittest.TestCase):
def test_12_keys(self):
self.assert_(repo.location_key())
- self.assertEquals(repo.location_key().value(), repo_path)
+ self.assertEquals(repo.location_key().parse_value(), repo_path)
self.assert_(repo.find_metadata("format"))
- self.assertEquals(repo.find_metadata("format").value(), "e")
+ self.assertEquals(repo.find_metadata("format").parse_value(), "e")
self.assert_(not repo.find_metadata("asdf"))
class TestCase_02_RepositoryInterfaces(unittest.TestCase):