Skip to content

Commit

Permalink
get existing tests passing before adding new ones
Browse files Browse the repository at this point in the history
  • Loading branch information
mikejgray committed Jun 2, 2024
1 parent 7031a22 commit c323c3b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/skill_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ jobs:
uses: neongeckocom/.github/.github/workflows/python_build_tests.yml@master
skill_unit_tests:
uses: neongeckocom/.github/.github/workflows/skill_tests.yml@master
with:
neon_versions: '[3.8, 3.9, "3.10", "3.11"]'
skill_intent_tests:
uses: neongeckocom/.github/.github/workflows/skill_test_intents.yml@master
skill_resource_tests:
uses: neongeckocom/.github/.github/workflows/skill_test_resources.yml@master
skill_install_tests:
uses: neongeckocom/.github/.github/workflows/skill_test_installation.yml@master
with:
test_osm: false
test_osm: false
6 changes: 5 additions & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
from typing import List
from enum import Enum
from posixpath import expanduser
from os.path import expanduser
from random import randint
from typing import Optional

Expand Down Expand Up @@ -361,6 +361,7 @@ def _enable_wake_word(self, ww: str, message: Message) -> bool:
self.speak_dialog("error_ww_change_failed")
return False
if resp and resp.data.get("error"):
self.speak_dialog("error_ww_change_failed")
self.log.error(f"WW enable failed with response: {resp.data}")
return False
else:
Expand Down Expand Up @@ -508,4 +509,7 @@ def _emit_enable_ww_message(self, ww: str, message: Message) -> Optional[Message
if not resp:
LOG.error(f"No response to WW enable request for {ww}!")
return None
if resp.data.get("error"):
LOG.error(f"WW enable failed with response: {resp.data}")
return None
return resp
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ neon-utils~=1.0
ovos-utils~=0.0, >=0.0.28
ovos-bus-client~=0.0.3
ovos-workshop~=0.0.15
ovos-plugin-manager~=0.0.25
adapt-parser<2.0,>=0.5
2 changes: 1 addition & 1 deletion test/test_skill.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# pylint: disable=W0212,C0116,C0415,W0603
# NEON AI (TM) SOFTWARE, Software Development Kit & Application Framework
# All trademark and other rights reserved by their respective owners
# Copyright 2008-2022 Neongecko.com Inc.
Expand Down Expand Up @@ -644,7 +645,6 @@ def _handle_enable_ww(message):
self.skill.bus.once("neon.enable_wake_word", _handle_enable_ww)
self.skill.bus.once("neon.disable_wake_word", disable_ww)

self.skill.speak_dialog.reset_mock()
self.skill.handle_change_ww(message_change_hey_neon)
self.skill.speak_dialog.assert_called_with("error_ww_change_failed")
disable_ww.assert_not_called()
Expand Down

0 comments on commit c323c3b

Please sign in to comment.