MCPcopy
hub / github.com/cool-RR/PySnooper / check

Method check

tests/utils.py:109–118  ·  view source on GitHub ↗
(self, s)

Source from the content-addressed store, hash-verified

107 self.tolerance = tolerance
108
109 def check(self, s):
110 match = self.line_pattern.match(s)
111 if not match:
112 return False
113 timedelta = pysnooper.pycompat.timedelta_parse(match.group('time'))
114 if self.elapsed_time_value:
115 return abs(timedelta.total_seconds() - self.elapsed_time_value) \
116 <= self.tolerance
117 else:
118 return True
119
120
121

Callers

nothing calls this directly

Calls 2

matchMethod · 0.80
groupMethod · 0.45

Tested by

no test coverage detected