openstack team mailing list archive
-
openstack team
-
Mailing list archive
-
Message #00084
Re: Test Frameworks ...
On Mon, Nov 22, 2010 at 4:20 PM, Michael Gundlach
<michael.gundlach@xxxxxxxxxxxxx> wrote:
> On Mon, Nov 22, 2010 at 9:33 AM, Jay Pipes <jaypipes@xxxxxxxxx> wrote:
>>
>> I would prefer option #1 and to get rid of run_tests.py entirely.
>> With nose, it's not useful at all. So, I would change the
>> run_tests.sh script to run nosetests instead of run_tests.py...this is
>
> I vote we also get rid of run_tests.sh and the unit test base class, so we
> aren't tempted to add dependencies required for nova tests to run. Running
> tests then becomes typing "nosetests" in nova/tests.
Hmm, not quite. :) run_tests.sh has some niceness in it to setup,
install dependencies to, and execute tests in a virtual env.
> Argument: if run_tests.sh accretes complexity, we can't just run "nosetests
> [some sub-package]" anymore; it's all or nothing, like run_tests.py today.
> If a test base class accretes complexity, we'll end up making all our tests
> inherit from it out of copy-and-paste laziness, and then someone will add a
> feature to it that makes the base class required, and now even simple tests
> have a bunch of cruft attached that they didn't need.
Although I had to look up what "accrete" meant, I got your point
regardless :) The above scenario has already happened in some cases
(and most of those cases have been cleaned up in our working branch)
> I like how Jay has proceeded so far in ~jaypipes/nova/cleanup-unittests --
> the nova.tests.utils module provides handy functions for tests that need it,
> but otherwise tests are just vanilla unitest.TestCases.
++
-jay
Follow ups
References