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

Kumar McMillan kumar.mcmillan at gmail.com
Fri Jul 18 12:16:05 PDT 2008

On Fri, Jul 18, 2008 at 4:45 AM, Ben Finney <ben+python at benfinney.id.au> wrote:
> Howdy all,
> I'm working on a plugin for 'nose', called 'nose_scenario'
> <URL:http://pypi.python.org/pypi/nose_scenario/>. I'm hoping to get
> some help from people more knowledgeable about 'nose' that I am.
> The plugin (please refer to its documentation and sample tests) is
> largely working okay, but two things are causing me trouble as of
> version 0.1.1 <URL:http://pypi.python.org/pypi/nose_scenario/0.1.1>:

Hi Ben.
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?

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

> * The application of attributes to test cases is working correctly for
>  subclasses of 'unittest.TestCase', but not for other test classes.
>  This can be seen in the sample tests: the 'test_unittest.py' module
>  behaves correctly, but the 'test_testclass.py' module throws an
>  AttributeError for every single test case.
>  Why are the attributes beingapplied correctly to instances of
>  'unittest.TestCase', but not other instances?
> * The display of a short description for each test case should include
>  the scenario id string, if that test case has one. This is currently
>  *only* working for test cases that have a docstring; other test
>  cases seem to ignore the custom short description hook.
>  This can be seen in the sample tests: test cases with a docstring
>  correctly display their scenario id, but others do not.
>  How can I get the short description modified for all cases?
> Thanks in advance for anyone's assistance with this. The nose
> framework is powerful but making my brain hurt a little :-/
> --
>  \     "Listen: we are here on Earth to fart around. Don't let anybody |
>  `\                  tell you otherwise." —_Timequake_, Kurt Vonnegut |
> _o__)                                                                  |
> Ben Finney
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python

More information about the testing-in-python mailing list