[TIP] Plugin API for nose: Expanding one test case into many

Ben Finney ben+python at benfinney.id.au
Fri Jul 18 18:07:38 PDT 2008


"Kumar McMillan" <kumar.mcmillan at gmail.com> writes:

> This sounds interesting and I'm curious but I don't fully understand
> it. Could you point me to some examples of writing test scenarios
> then adapting them? Or did I miss the link to the documentation?

The documentation is the docstrings :-)

The examples are in the 'test/' directory of the source distribution.
Simply install the plugin as per any other 'nose' plugin, and then:

    $ nosetests --with-scenario test/test_unittest.py
    $ nosetests --with-scenario test/test_testclass.py

They'll partially work as expected, but break in the ways described in
my original post.

> PS. "homepage" link from the PyPi page above is broken (has a dash but
> needs an underscore)

Thanks, fixed and uploaded as version 0.1.2
<URL:http://pypi.python.org/pypi/nose_scenario/0.1.2>.

I look forward to ideas on how to address the issues in my original
post.

-- 
 \       “For of those to whom much is given, much is required.” —John |
  `\                                                        F. Kennedy |
_o__)                                                                  |
Ben Finney




More information about the testing-in-python mailing list