MCPcopy Index your code
hub / github.com/cirosantilli/linux-kernel-module-cheat / teardown

Method teardown

common.py:1174–1194  ·  view source on GitHub ↗

:return: 1 if any test failed, 0 otherwise

(self)

Source from the content-addressed store, hash-verified

1172 self.tests.append(Test(test_id_string, test_result, ellapsed_seconds))
1173
1174 def teardown(self):
1175 '''
1176 :return: 1 if any test failed, 0 otherwise
1177 '''
1178 self.log_info('Test result summary')
1179 passes = []
1180 fails = []
1181 for test in self.tests:
1182 if test.result in (TestResult.PASS, None):
1183 passes.append(test)
1184 else:
1185 fails.append(test)
1186 if passes:
1187 for test in passes:
1188 self.log_info(test)
1189 if fails:
1190 for test in fails:
1191 self.log_info(test)
1192 self.log_error('A test failed')
1193 return 1
1194 return 0

Callers

nothing calls this directly

Calls 2

log_infoMethod · 0.80
log_errorMethod · 0.80

Tested by

no test coverage detected