This is an automatically generated e-mail. To reply, visit: http://reviewboard-openlmi.rhcloud.com/r/1147/

On October 30th, 2013, 2:44 p.m. UTC, 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>.
Yeah, some kind of description "why?" would be helpful. I would use regular expression:
  string = re.sub(r'-\d+:', '-', string)

On October 30th, 2013, 2:44 p.m. UTC, 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 fails
Unfortunately this is available since python 2.7.

On October 30th, 2013, 2:44 p.m. UTC, Radek Novacek wrote:

src/software/test/testSoftware.py (Diff revision 1)
284
The matching against 'yum list available' is missing. If it is on purpose, add at least a TODO comment.
This should be achievable. Try to remove installed packages and duplicities from lmi list and compare them. (I haven't tried).

On October 30th, 2013, 2:44 p.m. UTC, Radek Novacek wrote:

src/software/test/testSoftware.py (Diff revision 1)
300
        self.assertEqual(repos, yum_repos)
assertEqual -> assertListEqual
Since python 2.7.

On October 30th, 2013, 2:44 p.m. UTC, 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"]
From what I know:
  .InstalledSoftware["InstanceID"]
Because InstalledSoftware is an instance of pywbem.CIMInstanceName, which doesn't allow for smart attribute access.

On October 30th, 2013, 2:44 p.m. UTC, Radek Novacek wrote:

src/software/test/testSoftware.py (Diff revision 1)
592
        self.assertTrue(isinstance(installed_assoc, None.__class__))
self.assertIsNone()
Again, since python 2.7.

- Michal


On October 30th, 2013, 2:03 p.m. UTC, Jan Grec wrote:

Review request for OpenLMI Developers.
By Jan Grec.

Updated Oct. 30, 2013, 2:03 p.m.

Repository: openlmi-providers

Description

software - tests: software test suite with basic tests

This is only a "current-status" review. I'll be very thankful for any comments on what's wrong, how the structure should look like, etc.

My TODO is to
  * repair all broken tests
  * add all tests mentioned
  * bind test suite with new LmiTestCase class

I apologize for inconvenience, but I wasn't able to save previous review notes.

Diffs

  • src/software/test/lmi-test.repo (PRE-CREATION)
  • src/software/test/testSoftware.py (PRE-CREATION)

View Diff