pytest-spec
pytest-spec copied to clipboard
Add support for docstring of test classes
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
It would be a super useful feature to emulate describe and context as classes.
@pchomik are you considering implementing this feature?