[openstack-dev] Issues when running unit tests in OpenStack

victor stinner victor.stinner at enovance.com
Tue Apr 8 08:45:47 UTC 2014


Oh, I already got feedback from colleagues :-) Thanks.

> (1) First problem: if a Python module cannot be loaded, my terminal is
> flooded with a binary stream which looks like:
> 
> ...
> tCase.test_deprecated_without_replacement\xd7\xe1\x06\xa1\xb3)\x01 at l@atests.unit.test_versionutils.DeprecatedTestCa
> ...

This issue was reported:
https://bugs.launchpad.net/testrepository/+bug/1271133

It looks to depend on 4 changes in 4 projects:

* subunit: https://code.launchpad.net/~alexei-kornienko/subunit/bug-1271133
* testrepository: https://code.launchpad.net/~alexei-kornienko/testrepository/bug-1271133
* testtools: https://github.com/testing-cabal/testtools/pull/77
* Python unittest (for testtools): http://bugs.python.org/issue19746

> (2) When a test fails, it's hard to find the command to rerun a single
> failing test.
> 
> ...
> I try sometimes to activate the virtualenv and then type:
> 
>    testr run tests.unit.test_timeutils.TestIso8601Time.test_west_normalize

In the virtual environment, the following command works and is fast:

   python -m testtools.run tests.test_swiftclient.TestPutObject.test_unicode_ok

Victor



More information about the OpenStack-dev mailing list