[kupfer] wscript: 'test' target to run all doctests
- From: Ulrik Sverdrup <usverdrup src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [kupfer] wscript: 'test' target to run all doctests
- Date: Fri, 25 Sep 2009 15:54:08 +0000 (UTC)
commit f7738142d8293fb6ddfae4863cbfc4f35a65f5c3
Author: Ulrik Sverdrup <ulrik sverdrup gmail com>
Date: Wed Sep 23 12:25:25 2009 +0200
wscript: 'test' target to run all doctests
wscript | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/wscript b/wscript
index 569a123..0334066 100644
--- a/wscript
+++ b/wscript
@@ -192,6 +192,17 @@ def intlupdate(util):
os.popen("intltool-update %s" % lang)
os.popen("msgfmt --check %s" % lang_file)
+def test(bld):
+ # find all files with doctests
+ paths = os.popen("git grep -l 'doctest.testmod()' kupfer/").read().split()
+ all_success = True
+ for p in paths:
+ print p
+ res = os.popen("python '%s'" % p).read()
+ print (res or "OK")
+ all_success = all_success and bool(res)
+ return all_success
+
def shutdown():
pass
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]