pytest-spec icon indicating copy to clipboard operation
pytest-spec copied to clipboard

Add support for docstring of test classes

Open paxcodes opened this issue 4 years ago • 2 comments

Problem pytest-spec currently doesn't have an option to change how test classes are printed as a specification. There is a spec_header_format but that is different.

Given

class Test_class_XYZ:
    """docstring summary of Test_class_XYZ"""

    def test_case(self, result):
        """docstring summary of test_case"""

Desired

docstring summary of Test_class_XYZ:
  ✓ docstring summary of test_case     

Actual

Class XYZ:
  ✓ docstring summary of test_case

paxcodes avatar May 08 '21 00:05 paxcodes

It would be a super useful feature to emulate describe and context as classes.

felipecrp avatar Feb 23 '23 15:02 felipecrp

@pchomik are you considering implementing this feature?

felipecrp avatar Feb 23 '23 15:02 felipecrp