def test_simple_multisymbol_without_repeat(self):
     symbs = "abc defgh ijk lmnop qrs".split()
     input_data = ["["] + symbs + ["]"]
     expected = tuple(symbs)
     assert evaluate_symbol_query(*input_data) == (expected, True)
     assert evaluate_symbol_query("Not", *input_data) == (expected, False)
     with raises(TMSyntaxError):
         evaluate_symbol_query(*symbs)
     with raises(TMSyntaxError):
         evaluate_symbol_query("Not", *symbs)
Esempio n. 2
0
 def test_simple_multisymbol_without_repeat(self):
     symbs = "abc defgh ijk lmnop qrs".split()
     input_data = ["["] + symbs + ["]"]
     expected = tuple(symbs)
     assert evaluate_symbol_query(*input_data) == (expected, True)
     assert evaluate_symbol_query("Not", *input_data) == (expected, False)
     with raises(TMSyntaxError):
         evaluate_symbol_query(*symbs)
     with raises(TMSyntaxError):
         evaluate_symbol_query("Not", *symbs)
 def test_empty_query(self):
     assert evaluate_symbol_query() == (tuple(), False)
 def test_not_twice_or_invalidly_alone(self, symbs):
     with raises(TMSyntaxError):
         evaluate_symbol_query(*symbs)
     with raises(TMSyntaxError):
         evaluate_symbol_query("Not", *symbs)
 def test_valid_one_symbol_scenarios(self, symb):
     assert evaluate_symbol_query(symb) == ((symb,), True)
     assert evaluate_symbol_query("Not", symb) == ((symb,), False)
Esempio n. 6
0
 def test_empty_query(self):
     assert evaluate_symbol_query() == (tuple(), False)
Esempio n. 7
0
 def test_not_twice_or_invalidly_alone(self, symbs):
     with raises(TMSyntaxError):
         evaluate_symbol_query(*symbs)
     with raises(TMSyntaxError):
         evaluate_symbol_query("Not", *symbs)
Esempio n. 8
0
 def test_valid_one_symbol_scenarios(self, symb):
     assert evaluate_symbol_query(symb) == ((symb, ), True)
     assert evaluate_symbol_query("Not", symb) == ((symb, ), False)