Select the correct statements regarding the skipping of tests (framework unittest). (select two)
Select the correct statements regarding the skipping of tests (framework unittest). (select two)
a. The unittest framework does not support skipping tests.
b. The unittest framework supports skipping individual test methods and even entire classes.
c. To skip the test, use the unittest.skip()
decorator or one of its conditional variants: unittest.skipIf()
or unittest.skipUnless()
.
b. The unittest framework supports skipping individual test methods and even entire classes.
c. To skip the test, use the unittest.skip()
decorator or one of its conditional variants: unittest.skipIf()
or unittest.skipUnless()
.
Explanation:
Unittest supports skipping individual test methods and even whole classes of tests. In addition, it supports marking a test as an “expected failure,” a test that is broken and will fail, but shouldn’t be counted as a failure on a TestResult
.