Add documentation on writing tests for Breathe #931
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thanks for all of your work developing Breathe! I just worked my way through the process of figuring out how to write tests for Breathe. While it's still fresh in my head, I jotted down everything I wish I had known from the beginning in case it is helpful to others. This PR adds that additional information to the documentation.
Obviously, I'm happy to change anything that needs changing - you all have way more experience writing tests for Breathe than I do! I figured this could be a helpful starting point, though.
Also, I noticed that test_renderer.py is missing a
WrappedSectionDef
class, as well as a renderer capable of rendering sectiondefs (since the rendering process ends up trying to access the renderer's state member and throws an error when it isNone
). I tweaked the existing renderer to be able to handle a sectiondef, but then didn't end up needing it for my tests. That said, I could totally imagine others needing that functionality for writing tests. Would it be helpful for me to add these features to this PR? Or would you rather not add anything to the testing suite that isn't currently being used?