Skip to content

Commit

Permalink
Troubleshooting unit test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Sep 19, 2024
1 parent 5b195ac commit a48d1c7
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tests/unit_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import shutil
import sys
import unittest
import yaml

from os.path import dirname, join
from threading import Thread, Event
Expand All @@ -48,7 +49,6 @@
os.environ["OVOS_CONFIG_BASE_FOLDER"] = "neon"
os.environ["OVOS_CONFIG_FILENAME"] = "neon.yaml"


sys.path.append(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))


Expand Down Expand Up @@ -229,13 +229,13 @@ def on_ready(cls):

@classmethod
def setUpClass(cls):
from ovos_config.config import update_mycroft_config
# from neon_utils.configuration_utils import init_config_dir
# init_config_dir()
os.makedirs(join(CONFIG_PATH, "neon"), exist_ok=True)
test_config = join(CONFIG_PATH, "neon", "neon.yaml")
with open(test_config, 'w+') as f:
yaml.dump({"hotwords": cls.hotwords_config,
"stt": {"module": "neon-stt-plugin-nemo"},
"VAD": {"module": "dummy"}}, f)

update_mycroft_config({"hotwords": cls.hotwords_config,
"stt": {"module": "neon-stt-plugin-nemo"},
"VAD": {"module": "dummy"}})
import importlib
import ovos_config.config
importlib.reload(ovos_config.config)
Expand All @@ -244,7 +244,8 @@ def setUpClass(cls):

from neon_speech.service import NeonSpeechClient
cls.service = NeonSpeechClient(bus=cls.bus, ready_hook=cls.on_ready)
# assert Configuration() == service.loop.config_core

assert cls.service.reload_configuration in Configuration._callbacks

def _mocked_run():
stopping_event = Event()
Expand Down

0 comments on commit a48d1c7

Please sign in to comment.