Diff of /Test/CanNotProve/test.py [5cabfd] .. [4dca5a]  Maximize  Restore

  Switch to side-by-side view

--- a/Test/CanNotProve/test.py
+++ b/Test/CanNotProve/test.py
@@ -2,13 +2,12 @@
 
 from pyke import knowledge_engine
 
-Rule_package = 'Test.CanNotProve'
 Engine = None
 
 def test(kb, ke, arg):
     global Engine
     if Engine is None:
-        Engine = knowledge_engine.engine(Rule_package)
+        Engine = knowledge_engine.engine(__file__)
     Engine.reset()
     Engine.activate('rules')
     try:
@@ -24,5 +23,5 @@
     test('rules', 'rule2', 2)
     Engine.reset()
     Engine.activate('rules')
-    (arg,), no_plan = Engine.prove_1('facts', 'fact3', (), 1)
-    assert arg == 'hi\nthere'
+    vars, no_plan = Engine.prove_1_goal('facts.fact3($ans)')
+    assert vars['ans'] == 'hi\nthere'

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks