This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/1147/ |
On October 30th, 2013, 3:44 p.m. CET, Radek Novacek wrote:
src/software/test/testSoftware.py (Diff revision 1) 98 def _parse_rpm_installed_package_name(string):What is the purpose of this function? Remove epoch from NVR? If so then note that epoch could be arbitrary number, this works only for epoch <0..9>.On October 30th, 2013, 4:29 p.m. CET, Michal Minar wrote:
Yeah, some kind of description "why?" would be helpful. I would use regular expression: string = re.sub(r'-\d+:', '-', string)
Actually not used anywhere in the code, so I'm removing it completely.
On October 30th, 2013, 3:44 p.m. CET, Radek Novacek wrote:
src/software/test/testSoftware.py (Diff revision 1) 255 self.assertEqual(sorted(package_list), sorted(rpm_packages))use "assertListEqual", it produces better output when the test failsOn October 30th, 2013, 4:29 p.m. CET, Michal Minar wrote:
Unfortunately this is available since python 2.7.
I'm afraid there are more pieces of tests code that won't work on 2.6 Shall we strictly support python 2.6 and more, or is it ok to run with 2.7 and eventually rewrite tests for older python versions when it's needed?
On October 30th, 2013, 3:44 p.m. CET, Radek Novacek wrote:
src/software/test/testSoftware.py (Diff revision 1) 312 package_name = self.cim.LMI_InstalledSoftwareIdentity.first_instance().path["InstalledSoftware"]["InstanceID"]You can use .InstalledSoftware.InstanceID instead of .path["InstalledSoftware"]["InstanceID"]On October 30th, 2013, 4:29 p.m. CET, Michal Minar wrote:
From what I know: .InstalledSoftware["InstanceID"] Because InstalledSoftware is an instance of pywbem.CIMInstanceName, which doesn't allow for smart attribute access.
This shortcut somewhere works for me, but in this specific place is doesn't. TypeError: 'LMIInstanceName' object has no attribute '__getitem__'
- Jan
On October 30th, 2013, 3:03 p.m. CET, Jan Grec wrote:
Review request for OpenLMI Developers.
By Jan Grec.
Updated Oct. 30, 2013, 3:03 p.m.
Repository:
openlmi-providers
Description
Diffs
|