MCPcopy Index your code
hub / github.com/msiemens/tinydb / test

Method test

tinydb/queries.py:341–345  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

339 :param flags: regex flags to pass to ``re.match``
340 """
341 def test(value):
342 if not isinstance(value, str):
343 return False
344
345 return re.match(regex, value, flags) is not None
346
347 return self._generate_test(test, ('matches', self._path, regex))
348

Callers 3

test_customFunction · 0.80
test_custom_with_paramsFunction · 0.80
test_hasFunction · 0.80

Calls 3

_generate_testMethod · 0.95
is_sequenceFunction · 0.85
searchMethod · 0.45

Tested by 3

test_customFunction · 0.64
test_custom_with_paramsFunction · 0.64
test_hasFunction · 0.64