-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CommonQuerySkill handler complete event and tests (#142)
Co-authored-by: Daniel McKnight <[email protected]>
- Loading branch information
1 parent
dc877dc
commit 156e606
Showing
2 changed files
with
127 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
from unittest import TestCase | ||
|
||
from ovos_utils.messagebus import FakeBus | ||
from ovos_workshop.skills.base import BaseSkill | ||
from ovos_workshop.skills.common_query_skill import CommonQuerySkill, CQSMatchLevel | ||
|
||
|
||
class TestQASkill(CommonQuerySkill): | ||
def CQS_match_query_phrase(self, phrase): | ||
pass | ||
|
||
def CQS_action(self, phrase, data): | ||
pass | ||
|
||
|
||
class TestCommonQuerySkill(TestCase): | ||
skill = TestQASkill("test_common_query", FakeBus()) | ||
|
||
def test_class_inheritance(self): | ||
from ovos_workshop.skills.ovos import OVOSSkill | ||
from ovos_workshop.skills.mycroft_skill import MycroftSkill | ||
self.assertIsInstance(self.skill, BaseSkill) | ||
self.assertIsInstance(self.skill, OVOSSkill) | ||
self.assertIsInstance(self.skill, MycroftSkill) | ||
self.assertIsInstance(self.skill, CommonQuerySkill) | ||
|
||
def test_00_skill_init(self): | ||
for conf in self.skill.level_confidence: | ||
self.assertIsInstance(conf, CQSMatchLevel) | ||
self.assertIsInstance(self.skill.level_confidence[conf], float) | ||
self.assertIsNotNone(self.skill.bus.ee.listeners("question:query")) | ||
self.assertIsNotNone(self.skill.bus.ee.listeners("question:action")) | ||
|
||
def test_handle_question_query(self): | ||
# TODO | ||
pass | ||
|
||
def test_get_cq(self): | ||
# TODO | ||
pass | ||
|
||
def test_remove_noise(self): | ||
# TODO | ||
pass | ||
|
||
def test_calc_confidence(self): | ||
# TODO | ||
pass | ||
|
||
def test_handle_query_action(self): | ||
# TODO | ||
pass |