Store doctest verbose results to a variable

mitchell mforal at gmail.com
Thu May 26 12:37:42 EDT 2005


Is it possible to store doctest's verbose output to a variable?

For example:

  import doctest, my_test_module
  a = doctest.testmod(my_test_module)

The contents of 'a' is the tuple of passed and failed results. I tried
passing verbose mode to the testmod function, but 'a' is still a tuple.

Any help is greatly appreciated.




More information about the Python-list mailing list