Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser autodoc tests #133

Merged
merged 4 commits into from
Jan 30, 2023
Merged

Parser autodoc tests #133

merged 4 commits into from
Jan 30, 2023

Conversation

jnikula
Copy link
Owner

@jnikula jnikula commented Jan 30, 2023

Improve parser whitespace robustness for the non-autodoc auto* directives. See the last commit message for details.

Use get() instead of pop(), and rely on the implicit default None for
get().

Bump copyright years while at it.
It's just confusing, use a separate name for directive options.
Start using a similar docstring walk in the parser test as in the
extension implementation, in preparation for adding similar filters.
Add type, name and member filtering for docstring walk in order to
support running the auto* directive tests on the parser directly, and
skip fewer test cases.

We find that we do need to adjust some expected results due to
whitespace changes that the extension test via Sphinx normalizes to the
same and ignores.

We also need to add "public" to C++ struct/class members in expected
results to match the direct parser output. The extension test via Sphinx
drops them.

This does not increase test coverage overall, but improves robustness at
least wrt whitespace in the auto* directive output.
@BrunoMSantos
Copy link
Collaborator

Looks good to me!

@jnikula jnikula merged commit 61f073c into master Jan 30, 2023
@jnikula jnikula deleted the parser-autodoc-tests branch February 26, 2023 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants