Alex's Blog

IT stuff

Wednesday, July 26, 2006

Python doctest

It is well known, but I wanted to summerize ut for me how to doctest modules:

import sys,doctest

import somemodule

modules = (somemodule,)

def _test():
verbose = "-v" in sys.argv
for mod in modules:
doctest.testmod(mod, verbose=verbose, report=0)
doctest.master.summarize()

if __name__ == "__main__":
_test()
Posted by Alex Greif at 6:17 AM
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Labels

  • cabal (1)
  • couchapp (3)
  • couchdb (3)
  • csrf (1)
  • cucumber (1)
  • curl (1)
  • debian (2)
  • emacs (2)
  • erica (1)
  • erlang (1)
  • format (1)
  • freebsd (6)
  • git (9)
  • haskell (26)
  • helm (1)
  • https (1)
  • i3 (1)
  • imagemagick (1)
  • indesign (1)
  • java (1)
  • json (2)
  • ldap (1)
  • mac (1)
  • monad (1)
  • monadtransformer (1)
  • mutt (1)
  • nix (3)
  • nixos (5)
  • node (1)
  • openbsd (5)
  • opensmtpd (1)
  • python (2)
  • radical (1)
  • rails (1)
  • regex (1)
  • ruby (1)
  • samba (2)
  • sandbox (1)
  • shell (3)
  • shellac (1)
  • sieve (1)
  • ssl (2)
  • stack (3)
  • tls (2)
  • tmux (1)
  • unix (1)
  • web (2)
  • x11 (2)
  • yesod (8)

Blog Archive

Simple theme. Powered by Blogger.