MCPcopy
hub / github.com/borgbackup/borg / evaluate

Function evaluate

src/borg/testsuite/patterns_test.py:413–419  ·  view source on GitHub ↗
(filename)

Source from the content-addressed store, hash-verified

411 files = ["data/something00.txt", "more/data", "home", " #/wsfoobar", "\tstart/whitespace", "whitespace/end\t"]
412
413 def evaluate(filename):
414 patterns = []
415 with open(filename) as f:
416 load_exclude_file(f, patterns)
417 matcher = PatternMatcher(fallback=True)
418 matcher.add_inclexcl(patterns)
419 return [path for path in files if matcher.match(path)]
420
421 exclfile = tmpdir.join("exclude.txt")
422

Calls 5

add_inclexclMethod · 0.95
matchMethod · 0.95
load_exclude_fileFunction · 0.85
PatternMatcherClass · 0.85
load_pattern_fileFunction · 0.85

Tested by

no test coverage detected