Python Testing and Debugging
Python Testing and Debugging - Important Points
36. | What is the purpose of a code coverage tool in Python testing? |
---|
A. To measure the amount of code that is executed during testing
B. To generate test data for use in testing
C. To identify and fix errors in code
D. To simulate user interactions with a system
View Answer Discuss Work SpaceAnswer: option a
Explanation:
37. | Which module in Python provides support for mocking and patching? |
---|
A. unittest.mock
B. pytest-mock
C. mockito
D. all of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation:
38. | What is a regression test in Python testing? |
---|
A. A test that ensures that code changes have not introduced new errors
B. A test that measures the performance of a system under heavy loads
C. A test that simulates user interactions with a system
D. A test that verifies that code is functioning as expected
View Answer Discuss Work SpaceAnswer: option a
Explanation:
39. | What is a mutation test in Python testing? |
---|
A. A test that introduces deliberate errors into the code to measure the effectiveness of tests
B. A test that simulates user interactions with a system
C. A test that verifies that code is functioning as expected
D. A test that measures the performance of a system under heavy loads
View Answer Discuss Work SpaceAnswer: option a
Explanation:
40. | Which tool in Python can be used for code profiling? |
---|
A. cProfile
B. PyCharm
C. Visual Studio Code
D. all of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation: