MCPcopy Create free account
hub / github.com/chatmail/core / fnmatch_lines

Method fnmatch_lines

python/src/deltachat/testplugin.py:665–683  ·  view source on GitHub ↗
(self, pattern_lines)

Source from the content-addressed store, hash-verified

663 self.popen.wait(timeout=timeout)
664
665 def fnmatch_lines(self, pattern_lines):
666 patterns = [x.strip() for x in Source(pattern_lines.rstrip()).lines if x.strip()]
667 for next_pattern in patterns:
668 print("+++FNMATCH:", next_pattern)
669 ignored = []
670 while True:
671 line = self.stdout_queue.get()
672 if line is None:
673 if ignored:
674 print("BOT stdout terminated after these lines")
675 for line in ignored:
676 print(line)
677 raise IOError("BOT stdout-thread terminated")
678 if fnmatch.fnmatch(line, next_pattern):
679 print("+++MATCHED:", line)
680 break
681 else:
682 print("+++IGN:", line)
683 ignored.append(line)
684
685
686@pytest.fixture()

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected