Python Programming - Testing
Exercise : Testing - General Questions
- Testing - General Questions
46.
What does the
unittest.TestCase.addTypeEqualityFunc
method in Python's unittest module allow you to do?
Answer: Option
Explanation:
The
addTypeEqualityFunc
method allows you to add a custom equality function for specific types in Python's unittest module.
47.
In Python testing, what is the purpose of the
unittest.mock.Mock.assert_not_called
method?
Answer: Option
Explanation:
The
assert_not_called
method in Python unittest.mock.Mock
asserts that a method was not called.
48.
What is the purpose of the
unittest.TestCase.subTest
method?
Answer: Option
Explanation:
The
subTest
method allows you to add a sub-test to the test case in Python's unittest module.
49.
What is the purpose of the
unittest.mock.MagicMock.side_effect
attribute?
Answer: Option
Explanation:
The
side_effect
attribute in Python unittest.mock.MagicMock
is used to specify the exception to be raised by a method.
50.
In Python's
unittest
module, what does the unittest.skipIf
decorator do?
Answer: Option
Explanation:
The
unittest.skipIf
decorator is used to skip a test unless a specified condition is True in Python's unittest module.
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers