First steps of ConceptLexer. Need to update DefaultParser before continuing
This commit is contained in:
@@ -51,8 +51,28 @@ def test_i_can_get_sub_classes():
|
||||
default_parser = core.utils.get_class("parsers.DefaultParser.DefaultParser")
|
||||
exact_concept_parser = core.utils.get_class("parsers.ExactConceptParser.ExactConceptParser")
|
||||
python_parser = core.utils.get_class("parsers.PythonParser.PythonParser")
|
||||
concept_lexer_parser = core.utils.get_class("parsers.ConceptLexerParser.ConceptLexerParser")
|
||||
|
||||
assert base_parser not in sub_classes
|
||||
assert default_parser in sub_classes
|
||||
assert exact_concept_parser in sub_classes
|
||||
assert python_parser in sub_classes
|
||||
assert concept_lexer_parser in sub_classes
|
||||
|
||||
|
||||
@pytest.mark.parametrize("a,b, expected", [
|
||||
([], [], []),
|
||||
([], ['a'], ['a']),
|
||||
([[]], ['a'], [['a']]),
|
||||
(['a'], [], ['a']),
|
||||
([['a']], [], [['a']]),
|
||||
|
||||
([['a']], ['b'], [['a', 'b']]),
|
||||
([['a'], ['b']], ['c'], [['a', 'c'], ['b', 'c']]),
|
||||
([['a1', 'a2'], ['b1', 'b2', 'b3']], ['c'], [['a1', 'a2', 'c'], ['b1', 'b2', 'b3', 'c']]),
|
||||
([[]], ['a', 'b'], [['a'], ['b']]),
|
||||
([['a'], ['b']], ['c', 'd', 'e'], [['a', 'c'], ['b', 'c'], ['a', 'd'], ['b', 'd'], ['a', 'e'], ['b', 'e']]),
|
||||
])
|
||||
def test_i_can_product(a, b, expected):
|
||||
res = core.utils.product(a, b)
|
||||
assert res == expected
|
||||
|
||||
Reference in New Issue
Block a user