On Jan. 23, 2014, 2:32 p.m., Michal Minar wrote:
> There are a lot of changes like this:
> self.assert*(a, b, "error: %s != %s" % (a, b))
> to
> self.assert*(a, b, "error: %s != %s", a, b)
>
> is it intentional? I didn't worked for me when I tried it.
Yes, this is intentional. On lines 134 - 148 you find overriden methods of assertEqual,
assertNotEqual and assertGreater. These take variable number of arguments that are turned
into a message string. Without this little workaround, I would have to write:
self.assertEqual(inst.LinkTarget, lt_modif,
"Link target should match modified path %s:%s" %
(utf8_encode(pkg.name), utf8_encode(filepath))) # on a lot of places
Note the utf8_encode functions. I know it does not look compatible with standard assert*
methods, but there are simply too many calls of assertEqual() and similar needing this
change.
- Michal
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard-openlmi.rhcloud.com/r/1487/#review2168
-----------------------------------------------------------
On Jan. 23, 2014, 2:20 p.m., Michal Minar wrote:
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard-openlmi.rhcloud.com/r/1487/
-----------------------------------------------------------
(Updated Jan. 23, 2014, 2:20 p.m.)
Review request for OpenLMI Developers.
Repository: openlmi-providers
Description
-------
software: added tests for non-ascii characters
Test that unicode characters work at least for package files.
Diffs
-----
src/software/test/test_software_identity_file_check.py
6123d8c4e5f55e6912c0f7800054183e7a4e6dd7
src/software/test/reposetup.py c84e32cb54300b0245c3bc38461a8589627fdbe5
src/software/test/test_software_identity_checks.py
b9d5fbbbc7795b496db52e82ffd95f9db0698460
Diff:
http://reviewboard-openlmi.rhcloud.com/r/1487/diff/
Testing
-------
Thanks,
Michal Minar