Note to self: It is actually possible to select a single test module or a single test function in py.test.
But passing the file name as argument to a py.test invocation selects only the doctest from that file (wtf!?). Instead, you need to call it like this:
1 2 | $ py.test -k test_module # to run the tests from test_module.py $ py.test -k test_func # to run tests having the function name test_func |
This is documented in the section advanced test selection and running modes of the py.test documentation, although I fail to see how this is advanced.