PyDocs

Nav

Development Tools

TestCase.subTest

unittest

method of TestCase · Added in 3.4 (source)
  • TestCase.subTest(msg=None, **params)
Return a context manager that will return the enclosed block
of code in a subtest identified by the optional message and
keyword parameters.  A failure in the subtest marks the test
case as failed but resumes execution at the end of the enclosed
block, allowing further test code to be executed.
0 Examples
No examples for unittest/TestCase.subTest.
See Also
No see-alsos for unittest/TestCase.subTest
0 Notes
No notes for TestCase.subTest