Alexandre Vassalotti added the comment:

Looks good to me. Here's slightly modified patch ready to be committed.

----------
keywords: +patch
nosy: +alexandre.vassalotti
priority:  -> low
Added file: http://bugs.python.org/file8893/doctest.patch

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1530>
__________________________________
Index: Lib/doctest.py
===================================================================
--- Lib/doctest.py	(revision 59409)
+++ Lib/doctest.py	(working copy)
@@ -2657,12 +2657,15 @@
                 sys.path.insert(0, dirname)
                 m = __import__(filename[:-3])
                 del sys.path[0]
-                testmod(m)
+                failures, _ = testmod(m)
             else:
-                testfile(filename, module_relative=False)
+                failures, _ = testfile(filename, module_relative=False)
+            if failures:
+                return 1
     else:
         r = unittest.TextTestRunner()
         r.run(DocTestSuite())
+    return 0
 
 if __name__ == "__main__":
-    _test()
+    sys.exit(_test())
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to