[TIP] Walking directories with nose

Lawrence Oluyede l.oluyede at gmail.com
Thu Oct 18 15:13:30 PDT 2007


On 10/18/07, Titus Brown <titus at caltech.edu> wrote:
> On Thu, Oct 18, 2007 at 02:21:08PM +0200, Lawrence Oluyede wrote:
> -> Is it possible to tell nose to walk all the directories recursively
> -> and execute everything it finds that looks like a test? Exactly the
> -> py.test behavior, for example
>
> nose does this, in various ways and various forms, already.  Are you
> talking about a generic directory structure, e.g.
>
>         nothing/special/in/any/names/or/files/oh/here/is/a/test
>
> with no packages or anything inbetween?

I'm exactly talking about that kind of layout. Tests in tests/ or
test_abc.py in random dirs or like that. I thought nose could walk the
directories recursively and treat like a test anything resembling one.
Like py.test.

Anyway Jason already told me that nose does not do that and it's
easily customizable returning True in wantDirectory() in a custom
plugin.

Thanks

-- 
Lawrence, oluyede.org - neropercaso.it
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair



More information about the testing-in-python mailing list