Which Python module is commonly used for writing unit tests?
- debugger
- logging
- pytest
- unittest
The unittest module is commonly used in Python for writing unit tests. It provides a testing framework to create and run test cases and manage test suites. While pytest is another popular testing framework, it's not a module but an external library. debugger and logging are unrelated to writing unit tests.
Loading...
Related Quiz
- In Matplotlib, the ____ function is used to add text annotations in arbitrary locations of the plot.
- How can you detect a cycle in a linked list?
- What is the time complexity of a linear search algorithm in the worst case?
- How can you avoid hardcoding the URL in Django templates when using the anchor tag?
- How would you implement a custom loss function in a TensorFlow or PyTorch model?