ArtificialIntelligenceToolkit / aiml

Artificial Intelligence Markup Language chatbot tools
Other
30 stars 24 forks source link

Self test case 13 fails - star at beginning of pattern #7

Open jrwarwick opened 3 years ago

jrwarwick commented 3 years ago

Running python setup.py test results in many tests passed, but test 13 fails with this message:

FAIL: test13_star (test.test_kernel.TestKernel)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/pyaiml_test/aiml/test/test_kernel.py", line 106, in test13_star
    self._testTag('star test #1', 'You should test star begin', ['Begin star matched: You should'])
  File "/tmp/pyaiml_test/aiml/test/test_kernel.py", line 33, in _testTag
    self.assertIn( response, outputList, msg="input=%s"%input_ )
AssertionError: '' not found in ['Begin star matched: You should'] : input=You should test star begin

After a little tiny bit of fiddling, it looks like somehow the return of self.k.respond is blank. A little further with my limited pdb skills:

...
> /tmp/pyaiml_test/aiml/aiml/Kernel.py(390)respond()
-> response = self._respond(s, sessionID)
(Pdb) p s
'You should test star begin'
(Pdb) n
WARNING: No match found for input: You should test star begin
...

I invoked self._brain.dump() and captured to a file, which I will attempt to attach. I'm not confident in my ability to interpret, but it does look like that rule was added in, but (perhaps) strangely each word is in a separate array element instead of a single string. braindump.txt