Ejemplo n.º 1
0
    def test_regex(self):
        self.map.put("key-1", "car")
        self.map.put("key-2", "cry")
        self.map.put("key-3", "giraffe")

        predicate = matches_regex("this", "c[ar].*")

        self.assertItemsEqual(self.map.key_set(predicate), ["key-1", "key-2"])
    def test_regex(self):
        self.map.put("key-1", "car")
        self.map.put("key-2", "cry")
        self.map.put("key-3", "giraffe")

        predicate = matches_regex("this", "c[ar].*")

        self.assertItemsEqual(self.map.key_set(predicate), ["key-1", "key-2"])
Ejemplo n.º 3
0
 def test_regex(self):
     predicate = matches_regex("this", "c[ar].*")
     self.assertEqual(
         str(predicate),
         "RegexPredicate(attribute='this', pattern='c[ar].*')")
 def test_regex(self):
     predicate = matches_regex("this", "c[ar].*")
     self.assertEqual(str(predicate), "RegexPredicate(attribute='this', pattern='c[ar].*')")