I am trying to get into testing in Python using the doctest module. At the moment I do
- Write the tests for the functions.
- implement the functions code.
- If Tests pass, write more tests and more code.
- When the function is done move on to the next function to implement.
So after 3 or 4 (independent) functions in the same module with many tests I get a huge output by doctest. And it is a little annoysing.
Is there a way to tell doctest "don't test functions a()
, b()
and c()
", so that it runs only the unmarked functions?
I only found the doctest.SKIP
flag, which is not sufficient for my needs. I would have to place this flag in a lot of lines. And if I would want to check a marked function again, I would have to go manually through the code and remove any flag I set inside.