예제 #1
0
 def test_leading_wildcards_drops_existing_wildcards(self):
     terms = '*foo bar* qu*x'
     result = leading_wildcards(terms)
     self.assertEquals('(*foo *bar *qux)', result)
예제 #2
0
 def test_leading_wildcards_adds_parentheses(self):
     terms = 'foo bar'
     result = leading_wildcards(terms)
     self.assertTrue(result.startswith('('))
     self.assertTrue(result.endswith(')'))
예제 #3
0
 def test_leading_wildcards_prepends_wildcards_to_all_terms(self):
     terms = 'foo bar qux'
     result = leading_wildcards(terms)
     self.assertEquals('(*foo *bar *qux)', result)