unittest.TestCase.subTest()

subTest(msg=None, **params)

Return a context manager which executes the enclosed code block as a subtest. msg and params are optional, arbitrary values which are displayed whenever a subtest fails, allowing you to identify them clearly.

A test case can contain any number of subtest declarations, and they can be arbitrarily nested.

See Distinguishing test iterations using subtests for more information.

New in version 3.4.

doc_python
2016-10-07 17:46:29
Comments
Leave a Comment

Please login to continue.