def test_regex_matches_whole_name(self): result = V.is_regex(u"test.*\.py") self.failIf(result.match("test_foo.py_garbage")) self.failIf(result.match("garbage_test_foo.py"))
def test_passing_is_regex(self): value = u"test.*\.py" result = V.is_regex(value) self.assert_(hasattr(result, "match")) self.assert_(callable(result.match)) self.assert_(result.match("test_foo.py"))