[TIP] Nose Test Discovery - Am I doing it wrong?

Lawrence Oluyede l.oluyede at gmail.com
Tue Dec 2 03:53:04 PST 2008


On Tue, Dec 2, 2008 at 11:43 AM, Casey McGinty <casey.mcginty at gmail.com> wrote:
> Please tell if this is correct behavior when using nose. Assume I have a
> python file called 'myscript.py':
>
> $ ls .
>    myscript.py
>    ...
>
> $ cat myscript.py
> def test():
>     pass
>
> $ nosetests
> ----------------------------------------------------------------------
> Ran 0 tests in 0.006s

nose discovery looks for something resembling a test and that script
isn't, but you can force it to be executed using:

$ nosetests myscript.py


-- 
Lawrence, www.neropercaso.it - oluyede.org
"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