diff options
author | Guido Guenther <agx@sigxcpu.org> | 2008-04-14 14:13:51 +0200 |
---|---|---|
committer | Guido Guenther <agx@sigxcpu.org> | 2008-04-14 14:13:51 +0200 |
commit | a793e8c5092955fb59647b0bf51da0a6d626d869 (patch) | |
tree | 2c74411196339ed9217eb7ba183b1a2ee231e576 /gbp | |
parent | a8992fe33881dcfff7b9cf04448eaa54f6afc219 (diff) |
add _test()
to run doctests easily
Diffstat (limited to 'gbp')
-rw-r--r-- | gbp/command_wrappers.py | 10 | ||||
-rw-r--r-- | gbp/deb_utils.py | 8 | ||||
-rw-r--r-- | gbp/git_utils.py | 10 |
3 files changed, 26 insertions, 2 deletions
diff --git a/gbp/command_wrappers.py b/gbp/command_wrappers.py index 91e476e..26064cd 100644 --- a/gbp/command_wrappers.py +++ b/gbp/command_wrappers.py @@ -245,4 +245,12 @@ def copy_from(orig_dir, filters=[]): raise GbpError, "Cannot copy files, pipe failed." return [ os.path.normpath(f) for f in files if files ] -# vim:et:ts=4:sw=4: + +def _test(): + import doctest + doctest.testmod() + +if __name__ == '__main__': + _test() + +# vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: diff --git a/gbp/deb_utils.py b/gbp/deb_utils.py index 2e7b707..d6116ff 100644 --- a/gbp/deb_utils.py +++ b/gbp/deb_utils.py @@ -86,4 +86,12 @@ def unpack_orig(archive, tmpdir, filters): raise GbpError return unpackArchive.dir + +def _test(): + import doctest + doctest.testmod() + +if __name__ == '__main__': + _test() + # vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: diff --git a/gbp/git_utils.py b/gbp/git_utils.py index af55c20..c95dd31 100644 --- a/gbp/git_utils.py +++ b/gbp/git_utils.py @@ -1,6 +1,6 @@ # vim: set fileencoding=utf-8 : # -# (C) 2006,2007 Guido Guenther <agx@sigxcpu.org> +# (C) 2006,2007,2008 Guido Guenther <agx@sigxcpu.org> """provides some git repository related helpers""" import subprocess @@ -152,4 +152,12 @@ def rfc822_date_to_git(rfc822_date): tz = d.strftime("%z") return '%d %s' % (seconds, tz) + +def _test(): + import doctest + doctest.testmod() + +if __name__ == '__main__': + _test() + # vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: |