Commits

Cat's Eye Technologies  committed d19a829

Exit with code 1 if any doctests failed. Add test driver script.

  • Participants
  • Parent commits 4b7b6a3

Comments (0)

Files changed (2)

File src/8ebed2c.py

         options.compile = True
     if options.test:
         import doctest
-        doctest.testmod(rooibos)
-        doctest.testmod(context)
-        doctest.testmod(tests)
-        sys.exit(0)
+        (f1, smth) = doctest.testmod(rooibos)
+        (f2, smth) = doctest.testmod(context)
+        (f3, smth) = doctest.testmod(tests)
+        if f1 + f2 + f3 == 0:
+            sys.exit(0)
+        else:
+            sys.exit(1)
     if options.interactive:
         cmdline(options)
         sys.exit(0)
+#!/bin/sh
+
+src/8ebed2c.py -t -v