Python Programming - Testing - Discussion

Discussion Forum : Testing - General Questions (Q.No. 5)
5.
What is the purpose of the @classmethod decorator in a Python test class?
It marks a method as a class method
It signals that the method is a test case
It defines the setup logic for a test case
It is not used in test classes
Answer: Option
Explanation:
The @classmethod decorator in a Python test class is used to mark a method as a class method, allowing it to be called on the class itself rather than an instance.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.