MCPcopy Create free account
hub / github.com/Kitware/VTK / _check

Method _check

Wrapping/Python/vtkmodules/test/ErrorObserver.py:15–27  ·  view source on GitHub ↗
(self, seen, actual, expect, what)

Source from the content-addressed store, hash-verified

13 self._warning_message = data
14
15 def _check(self, seen, actual, expect, what):
16 if seen:
17 if actual.find(expect) == -1:
18 msg = 'ERROR: %s message does not contain "%s" got \n"%s"' \
19 % (what, expect, self.error_message)
20 raise RuntimeError(msg)
21 else:
22 what = what.lower()
23 msg = 'ERROR: Failed to catch any %s. ' \
24 'Expected the %s message to contain "%s"' \
25 % (what, what, expect)
26 raise RuntimeError(msg)
27 self.reset()
28
29 def check_error(self, expect):
30 self._check(self.saw_error, self.error_message, expect, 'Error')

Callers 2

check_errorMethod · 0.95
check_warningMethod · 0.95

Calls 4

resetMethod · 0.95
RuntimeErrorClass · 0.85
findMethod · 0.45
lowerMethod · 0.45

Tested by

no test coverage detected