Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Commit [664ff0] default Maximize Restore History

Fixed "import XYZ_plan" -- not found bug. All doctests working now.

mtnyogi mtnyogi 2007-11-08

added doc/testdocs
added doc/testdocs.py
removed doc/examples/__init__.py
changed doc/todo
changed pyke/compiler/compiler.krb
changed pyke/compiler/scanner.py
changed pyke/compiler/helpers.py
changed pyke/compiler/__init__.py
changed pyke/compiler/compiler_bc.py
changed pyke/compiler/krbparser.py
changed pyke/unique.py
changed pyke/bc_rule.py
changed pyke/rule_base.py
changed pyke/pattern.py
changed pyke/tmp_itertools.py
changed pyke/__init__.py
changed pyke/special.py
changed pyke/fact_base.py
changed pyke/fc_rule.py
changed pyke/knowledge_base.py
changed pyke/contexts.py
copied doc/notes -> pyke/testpyke
doc/testdocs Diff Switch to side-by-side view
Loading...
doc/testdocs.py Diff Switch to side-by-side view
Loading...
doc/examples/__init__.py
File was removed.
doc/todo Diff Switch to side-by-side view
Loading...
pyke/compiler/compiler.krb Diff Switch to side-by-side view
Loading...
pyke/compiler/scanner.py Diff Switch to side-by-side view
Loading...
pyke/compiler/helpers.py Diff Switch to side-by-side view
Loading...
pyke/compiler/__init__.py Diff Switch to side-by-side view
Loading...
pyke/compiler/compiler_bc.py Diff Switch to side-by-side view
Loading...
pyke/compiler/krbparser.py Diff Switch to side-by-side view
Loading...
pyke/unique.py Diff Switch to side-by-side view
Loading...
pyke/bc_rule.py Diff Switch to side-by-side view
Loading...
pyke/rule_base.py Diff Switch to side-by-side view
Loading...
pyke/pattern.py Diff Switch to side-by-side view
Loading...
pyke/tmp_itertools.py Diff Switch to side-by-side view
Loading...
pyke/__init__.py Diff Switch to side-by-side view
Loading...
pyke/special.py Diff Switch to side-by-side view
Loading...
pyke/fact_base.py Diff Switch to side-by-side view
Loading...
pyke/fc_rule.py Diff Switch to side-by-side view
Loading...
pyke/knowledge_base.py Diff Switch to side-by-side view
Loading...
pyke/contexts.py Diff Switch to side-by-side view
Loading...
doc/notes to pyke/testpyke
--- a/doc/notes
+++ b/pyke/testpyke
@@ -1,7 +1,35 @@
-- 'fail' can be used as a statement in python code.  It causes the current
-  rule to fail immediately without backtracking within that rule, but will
-  still try other rules for the same goal.
-  
-  Contrast this to special.cut() which succeeds the first time, but causes
-  both the current rule to fail without further backtracking in that rule
-  as well preventing other rules for the same goal to be tried.
+#!/bin/bash
+
+# testpyke
+#
+# no arguments.
+#
+# run in pyke source directory to test all doctests.
+# 
+# exit status > 0 if errors found.
+
+ERRORFILES="/tmp/testdocs.$$"
+
+> $ERRORFILES
+NUM_ERRORS=0
+
+for f in `find . -name '*.py'`
+do
+    echo Testing "$f"
+    if ! python2.5 "$f"
+    then
+        echo "$f" >> $ERRORFILES
+        NUM_ERRORS=$(($NUM_ERRORS + 1))
+    fi
+done
+
+if [ $NUM_ERRORS -eq 0 ]
+then
+    echo "No Errors!"
+    rm -f $ERRORFILES
+else
+    echo "********** ERRORS ************* $NUM_ERRORS files had errors:"
+    cat $ERRORFILES
+    rm -f $ERRORFILES
+    exit $NUM_ERRORS
+fi