run doctests with nose
authorGuido Günther <agx@sigxcpu.org>
Sat, 22 Aug 2009 12:02:47 +0000 (14:02 +0200)
committerGuido Günther <agx@sigxcpu.org>
Sat, 22 Aug 2009 12:26:48 +0000 (14:26 +0200)
debian/control
debian/rules
gbp/command_wrappers.py
gbp/deb_utils.py
gbp/git_utils.py

index 714c9a3..23e51b5 100644 (file)
@@ -3,7 +3,7 @@ Section: vcs
 Priority: optional
 Maintainer: Guido Günther <agx@sigxcpu.org>
 Build-Depends: cdbs, debhelper (>= 5), python-dev, python-support (>= 0.3),
- pychecker, gtk-doc-tools, sgml2x, docbook-utils, jade, python-dateutil
+ pychecker, gtk-doc-tools, sgml2x, docbook-utils, jade, python-dateutil, python-nose
 Standards-Version: 3.8.2
 Vcs-Git: http://honk.sigxcpu.org/git/git-buildpackage.git/
 Vcs-Browser: http://git.debian.org/?p=users/agx/git-buildpackage.git
index 057bf73..d1b764a 100755 (executable)
@@ -25,6 +25,7 @@ $(MANUAL): docs/manual.sgml docs/chapters/*.sgml docs/manpages/*.sgml
 
 ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
 checks: $(PYCHECKS)
+       nosetests --with-doctest
 endif
 
 %.py: %
index 8cfa7cb..8f6f7fe 100644 (file)
@@ -301,12 +301,4 @@ def copy_from(orig_dir, filters=[]):
         raise GbpError, "Cannot copy files, pipe failed."
     return [ os.path.normpath(f) for f in files if files ]
 
-
-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\:·:
index 2af2fdf..6a60f9b 100644 (file)
@@ -267,12 +267,4 @@ def guess_upstream_version(archive, version_regex=r''):
         if m:
             return m.group('version')
 
-
-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\:·:
index d89f778..cf22718 100644 (file)
@@ -230,13 +230,4 @@ 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\:·: