Select the correct statements regarding the skipping of tests (framework unittest). (select two)

Questions & AnswersCategory: PythonSelect the correct statements regarding the skipping of tests (framework unittest). (select two)
Lokesh Kumar Staff asked 2 years ago

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().

1 Answers
Lokesh Kumar Staff answered 2 years ago

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.