Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
Implement `bracket_expansion` test class (stubbed methods)
  • Loading branch information
NeonDaniel committed Apr 11, 2023
1 parent 26a5497 commit 4e6d3aa
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ovos_utils/bracket_expansion.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import re
from typing import List


def expand_parentheses(sent):
def expand_parentheses(sent: List[str]) -> List[str]:
"""
['1', '(', '2', '|', '3, ')'] -> [['1', '2'], ['1', '3']]
For example:
Expand Down
1 change: 0 additions & 1 deletion ovos_utils/enclosure/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

class MycroftEnclosures(str, Enum):
# TODO: Deprecate in 0.1.0
LOG.warning("This class is deprecated")
PICROFT = "picroft"
BIGSCREEN = "kde"
OVOS = "OpenVoiceOS"
Expand Down
31 changes: 31 additions & 0 deletions test/unittests/test_bracket_expansion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import unittest


class TestBracketExpansion(unittest.TestCase):
def test_expand_parentheses(self):
from ovos_utils.bracket_expansion import expand_parentheses
# TODO

def test_expand_options(self):
from ovos_utils.bracket_expansion import expand_options
# TODO

def test_fragment(self):
from ovos_utils.bracket_expansion import Fragment
# TODO

def test_word(self):
from ovos_utils.bracket_expansion import Word
# TODO

def test_sentence(self):
from ovos_utils.bracket_expansion import Sentence
# TODO

def test_options(self):
from ovos_utils.bracket_expansion import Options
# TODO

def test_sentence_tree_parser(self):
from ovos_utils.bracket_expansion import SentenceTreeParser
# TODO

0 comments on commit 4e6d3aa

Please sign in to comment.