Make describe functions available to reporting#53
Conversation
|
I didn't see any unit tests for the DescribeBlock class so I didn't add any tests for this change. If you would like to give some guidance (file location, test structure) on how you would want the tests to look, then I would be happy to write some to cover this change. |
|
Thank you for this PR and for the pytest-spec integration you prepared on top of it, and please accept my apologies for the long silence here, especially after you explicitly asked for guidance on testing and never got an answer. In the meantime, I'd be happy to hear your feedback on #55, in particular whether the API works for your pytest-spec changes. Thanks again for pushing this forward! |
What's changing
This change exposes a new API on collected test items called
Item.get_describe_function_heirarchy(). This function allows reporter plugins to gain access to the describe functions that were used to define the test suite structure.API changes
Item.get_describe_function_heirarchy()
DescribeBlock.describe_function_heirarchyto get the list.DescribeBlock.describe_function_heirarchy
Planed integration
I have implemented a change in pytest-spec to use this new API to provide docstring support for formatting describe statements.