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)
Example #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)
Example #6
0
 def test_empty_query(self):
     assert evaluate_symbol_query() == (tuple(), False)
Example #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)
Example #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)