Add a "test_env" config value when running tests

The skill can check for this in their code

if 'test_env' in self.config_core:
    test_this()

allowing some basic workarounds in the skill init stage.
pull/1786/head
Åke Forslund 2018-09-07 18:25:40 +02:00
parent 788090ad6a
commit 542dbbe863
1 changed files with 4 additions and 0 deletions

View File

@ -43,11 +43,15 @@ from mycroft.messagebus.message import Message
from mycroft.skills.core import create_skill_descriptor, load_skill, \
MycroftSkill, FallbackSkill
from mycroft.skills.settings import SkillSettings
from mycroft.configuration import Configuration
MainModule = '__init__'
DEFAULT_EVALUAITON_TIMEOUT = 30
# Set a configuration value to allow skills to check if they're in a test
Configuration.get()['test_env'] = True
# Easy way to show colors on terminals
class clr: