Manually adding test suite to nose
Asked Answered
E

1

4

I want to create a test suite manually instead of using test discovery (only in one module, the others should use discovery). I found how I can do this in unittests, but I'm not sure how to transfer that to nose and how it mixes with the discovery. The nose docs don't have examples and I don't understand how I'm supposed to use them. Could somebody please give me an example?

Details: I have test classes where I want to run each method a few times with different parameters. Ideally also changing the test names to something readable. I tried test generators, but they are quite buggy.

Ecclesiasticus answered 26/6, 2012 at 15:16 Comment(0)
D
0

Give nosetests the path to your suite, and it will be executed instead of using Nose's test discovery.

This command:

nosetests 

Does automatic test discovery.

These commands:

nosetests /path/to/file.py
nosetests /path/to/directory

Run the tests in file.py and directory respectively.

Alternatively, you could start auto discovery in a specific directory:

nosetests -w /path/to/directory

Check out nosetests -h for a full list of options.

Dyspnea answered 21/12, 2012 at 20:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.