MCPcopy Create free account
hub / github.com/apache/httpd / ignore_recent

Method ignore_recent

test/pyhttpd/log.py:86–110  ·  view source on GitHub ↗

After a test case triggered errors/warnings on purpose, add those to our 'caught' list so the do not get reported as 'missed'.

(self, lognos: List[str] = [], matches: List[str] = [])

Source from the content-addressed store, hash-verified

84 return False
85
86 def ignore_recent(self, lognos: List[str] = [], matches: List[str] = []):
87 """After a test case triggered errors/warnings on purpose, add
88 those to our 'caught' list so the do not get reported as 'missed'.
89 """
90 self._recent_errors = []
91 self._recent_warnings = []
92 if os.path.isfile(self._path):
93 with open(self._path) as fd:
94 fd.seek(self._recent_pos, os.SEEK_SET)
95 lognos_set = set(lognos)
96 for line in fd:
97 if self._is_ignored(line):
98 continue
99 if self._lookup_matches(line, matches):
100 self._caught_matches.add(line)
101 continue
102 m = self.RE_ERRLOG_WARN.match(line)
103 if m and self._lookup_lognos(line, lognos_set):
104 self._caught_warnings.add(line)
105 continue
106 m = self.RE_ERRLOG_ERROR.match(line)
107 if m and self._lookup_lognos(line, lognos_set):
108 self._caught_errors.add(line)
109 continue
110 self._recent_pos = fd.tell()
111
112 def get_missed(self) -> Tuple[List[str], List[str]]:
113 errors = []

Callers 15

test_md_790_002Method · 0.80
test_md_790_003Method · 0.80
test_md_710_004Method · 0.80
test_md_300_001Method · 0.80
test_md_300_002Method · 0.80
test_md_300_003Method · 0.80
test_md_300_004Method · 0.80
test_md_300_005Method · 0.80
test_md_300_006Method · 0.80
test_md_300_007Method · 0.80
test_md_300_008Method · 0.80
test_md_300_009Method · 0.80

Calls 4

_is_ignoredMethod · 0.95
_lookup_matchesMethod · 0.95
_lookup_lognosMethod · 0.95
addMethod · 0.80

Tested by 15

test_md_790_002Method · 0.64
test_md_790_003Method · 0.64
test_md_710_004Method · 0.64
test_md_300_001Method · 0.64
test_md_300_002Method · 0.64
test_md_300_003Method · 0.64
test_md_300_004Method · 0.64
test_md_300_005Method · 0.64
test_md_300_006Method · 0.64
test_md_300_007Method · 0.64
test_md_300_008Method · 0.64
test_md_300_009Method · 0.64