Python Testing and Debugging
Python Testing and Debugging - Important Points
26. | What is the purpose of a debugger in Python? |
---|
A. To help identify and fix errors in code
B. To optimize code performance
C. To test user interface interactions
D. To generate documentation for code
View Answer Discuss Work SpaceAnswer: option a
Explanation:
27. | Which module in Python provides support for logging? |
---|
A. logging
B. log
C. logger
D. all of the above
View Answer Discuss Work SpaceAnswer: option a
Explanation:
28. | What is a traceback in Python? |
---|
A. A list of the functions that were called before an exception occurred
B. A list of the functions that will be called next
C. A list of the variables that are currently in scope
D. A list of the variables that were modified by the last function call
View Answer Discuss Work SpaceAnswer: option a
Explanation:
29. | What is an assertion in Python testing? |
---|
A. A statement that tests whether a condition is true
B. A statement that generates a warning message
C. A statement that terminates program execution
D. A statement that logs a message to a file
View Answer Discuss Work SpaceAnswer: option a
Explanation:
30. | Which tool in Python can be used for static code analysis? |
---|
A. PyLint
B. Flake8
C. Bandit
D. all of the above
View Answer Discuss Work SpaceAnswer: option d
Explanation: