MCPcopy Create free account
hub / github.com/seleniumbase/SeleniumBase / addError

Method addError

seleniumbase/plugins/base_plugin.py:339–362  ·  view source on GitHub ↗

Since Skip, Blocked, and Deprecated are all technically errors, but not error states, we want to make sure that they don't show up in the nose output as errors.

(self, test, err, capt=None)

Source from the content-addressed store, hash-verified

337 self.add_fails_or_errors(test, err)
338
339 def addError(self, test, err, capt=None):
340 """Since Skip, Blocked, and Deprecated are all technically errors,
341 but not error states, we want to make sure that they
342 don't show up in the nose output as errors."""
343 from seleniumbase.fixtures import errors
344
345 if (
346 err[0] == errors.BlockedTest
347 or (err[0] == errors.SkipTest)
348 or (err[0] == errors.DeprecatedTest)
349 ):
350 print(
351 err[1]
352 .__str__()
353 .split(
354 """-------------------- >> """
355 """begin captured logging"""
356 """ << --------------------""",
357 1,
358 )[0]
359 )
360 else:
361 pass
362 self.add_fails_or_errors(test, err)
363
364 def handleError(self, test, err, capt=None):
365 """After each test error, record testcase run information.

Callers 1

runMethod · 0.45

Calls 2

add_fails_or_errorsMethod · 0.95
__str__Method · 0.45

Tested by

no test coverage detected