unittest.registerResult
Prev: unittest.main | Up: unittest | Next: unittest.removeHandler
Rel: unittest.addModuleCleanup, unittest.doModuleCleanups, unittest.enterModuleContext, unittest.expectedFailure
Ref: docs.python.org — unittest.registerResult
Tags: #public #python3 #stdlib #unittest
Import
import unittest
from unittest import registerResult
Signature & Overview
unittest.registerResult(result)
unittest.registerResult() function.
Usage
import unittest
res = unittest.TestResult()
unittest.registerResult(res)
assert unittest.removeResult(res) is True
Gotchas
- Pairs with
installHandler(): Tells the Ctrl-C signal handler whichTestResultinstances should stop cleanly onSIGINT.
REPL Inspect
from unittest import registerResult
help(registerResult)
Linked from
Related notes
- tuts/python3/stdlib_module/unittest/main Linked here; links to this page; shared tags: #stdlib, #unittest
- tuts/python3/stdlib_module/unittest/removeHandler Linked here; links to this page; shared tags: #stdlib, #unittest
- tuts/python3/stdlib_module/unittest Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/unittest/addModuleCleanup Linked here; shared tags: #stdlib, #unittest
- tuts/python3/stdlib_module/unittest/doModuleCleanups Linked here; shared tags: #stdlib, #unittest
- tuts/python3/stdlib_module/unittest/enterModuleContext Linked here; shared tags: #stdlib, #unittest
- tuts/python3/stdlib_module/unittest/expectedFailure Linked here; shared tags: #stdlib, #unittest
- tuts/python3/stdlib_module/unittest/FunctionTestCase shared tags: #stdlib, #unittest
- tuts/python3/stdlib_module/unittest/installHandler shared tags: #stdlib, #unittest
- tuts/python3/stdlib_module/unittest/IsolatedAsyncioTestCase shared tags: #stdlib, #unittest