On 04/08/2014 08:12 AM, victor stinner wrote:
Hi,

Olso Incubator runs tests using testr on Python 2, but it uses nosetests on 
Python 3 to only run a subset of the test suite (modules and tests ported to 
Python 3). In my latest patch for Oslo Incubator (gettext), Ben Nemec wrote:
"I think we could get around the nose issue by using a testr regex to filter the 
tests we run for py33 (like I did in py27 for running everything but rpc in parallel), 
but that's outside the scope of this change so +2."

I tried to run Olso Incubator tests with testr on Python 3, but testr fails to load 
"openstack.common.eventlet_backdoor", because eventlet module is not installed 
(eventlet is not Python 3 compatible yet). If I understood correctly, testr first loads 
all modules and then filter the tests to run using the regex passed on the command line. 
If I'm correct, I don't see right now how to run Olso Incubator tests with testr on 
Python 3. But I don't know well the Testr tool, so I missed probably an option.

I would like to use testr because many Olso Incubator tests use testscenarios 
(which doesn't work with nosetests).

By the way, would it be possible to fix nosetests to use testscenarios?

Victor

Mehdi actually reminded me why we aren't using testr already: http://lists.openstack.org/pipermail/openstack-dev/2014-April/032202.html

It might still be possible to implement using the test discovery feature of testr to remove the bad tests before testr even gets them (see https://github.com/openstack/diskimage-builder/blob/master/diskimage_builder/tests/test_elements.py ), but I don't have much experience with that so I can't say for sure whether it would work either.

Also, I believe Mehdi had a change proposed to address the problems running testscenarios in nose. I think the patch is still waiting for a merge though:

https://code.launchpad.net/~sileht/testscenarios/testscenarios/+merge/211038

-Ben


_______________________________________________
OpenStack-dev mailing list
OpenStack-dev@lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to