Join Now
Home Aptitude Reasoning DI VA GK CA CA Hindi Quiz Placements
To run tests and report the results
To generate test data for use in testing
To analyze code performance during testing
To identify and fix errors in test code
To catch errors and handle them gracefully
To output messages to the user
To verify database connections
To ensure code is executed regardless of whether an exception is raised
raise Exception("Error message")
assert Exception("Error message")
print Exception("Error message")
throw Exception("Error message")
A location in the code where the program stops running
A location in the code where the program starts running
A location in the code where the program outputs a message
A location in the code where the program skips a line
unittest
pytest
doctest
all of the above
A list of the functions that were called before an exception occurred
A list of the functions that will be called next
A list of the variables that are currently in scope
A list of the variables that were modified by the last function call
A statement that tests whether a condition is true
A statement that generates a warning message
A statement that terminates program execution
A statement that logs a message to a file
To test user interface interactions
A test that verifies the entire system
A test that verifies a single function or module
A test that verifies changes made to the code do not cause existing functionality to break
A test that verifies the database
cProfile
logging
pdb