Ejemplo n.º 1
0
 def test_not_regex(self):
     assert not CommandStrategy._is_end_regex("test")
     assert not CommandStrategy._is_end_regex("something")
     assert not CommandStrategy._is_end_regex("a longer thing")
     assert not CommandStrategy._is_end_regex("/special characters$^")
Ejemplo n.º 2
0
 def test_regexes(self):
     assert CommandStrategy._is_end_regex("/something.*/")
     assert CommandStrategy._is_end_regex("/something else/i")
     assert CommandStrategy._is_end_regex("another /g")
     assert CommandStrategy._is_end_regex("/a last thing/ig")
Ejemplo n.º 3
0
 def test_empty(self):
     assert not CommandStrategy._is_end_regex("")