diff --git a/requirements/test.txt b/requirements/test.txt new file mode 100644 index 0000000..5e5737f --- /dev/null +++ b/requirements/test.txt @@ -0,0 +1 @@ +neon-minerva[padatious]~=0.1,>=0.1.1a1 diff --git a/setup.py b/setup.py index ad624fe..51b805c 100644 --- a/setup.py +++ b/setup.py @@ -89,6 +89,7 @@ def find_resource_files(): url=f'https://github.com/NeonGeckoCom/{SKILL_NAME}', license='BSD-3-Clause', install_requires=get_requirements("requirements.txt"), + extras_require={"test": get_requirements("requirements/test.txt")}, author='Neongecko', author_email='developers@neon.ai', long_description=long_description, diff --git a/test/test_skill.py b/test/test_skill.py index c4cede2..74d5808 100644 --- a/test/test_skill.py +++ b/test/test_skill.py @@ -16,43 +16,16 @@ # Specialized conversational reconveyance options from Conversation Processing Intelligence Corp. # US Patents 2008-2021: US7424516, US20140161250, US20140177813, US8638908, US8068604, US8553852, US10530923, US10530924 # China Patent: CN102017585 - Europe Patent: EU2156652 - Patents Pending -import json -import os + import unittest from copy import deepcopy -from os import mkdir -from os.path import dirname, join, exists from mock import Mock -from ovos_utils.messagebus import FakeBus from ovos_bus_client import Message -from mycroft.skills.skill_loader import SkillLoader - - -class TestSkill(unittest.TestCase): - @classmethod - def setUpClass(cls) -> None: - bus = FakeBus() - bus.run_in_thread() - skill_loader = SkillLoader(bus, dirname(dirname(__file__))) - skill_loader.load() - cls.skill = skill_loader.instance - - # Define a directory to use for testing - cls.test_fs = join(dirname(__file__), "skill_fs") - if not exists(cls.test_fs): - mkdir(cls.test_fs) - - # Override fs paths to use the test directory - cls.skill.settings_write_path = cls.test_fs - cls.skill.file_system.path = cls.test_fs - cls.skill._init_settings() - cls.skill.initialize() +from neon_minerva.tests.skill_unit_test_base import SkillTestCase - # Override speak and speak_dialog to test passed arguments - cls.skill.speak = Mock() - cls.skill.speak_dialog = Mock() +class TestSkillMethods(SkillTestCase): def test_00_skill_init(self): # Test any parameters expected to be set in init or initialize methods from neon_utils.skills.common_query_skill import CommonQuerySkill