-
Notifications
You must be signed in to change notification settings - Fork 3
feat(test): add doctest support to pytest #268
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
Conversation
- Add pytest-doctestplus dependency and configure pytest for doctests - Add poe task `check-doctests` to run doctests independently - Fix docstrings across 11 modules for doctest compatibility: - Unindent code examples from fenced blocks - Add doctest directives (SKIP, ELLIPSIS, NORMALIZE_WHITESPACE) - Fix expected output formatting - Add mkdocs hook to strip doctest flags from rendered documentation
📝 WalkthroughWalkthroughThis pull request establishes doctest management infrastructure and updates doctests across the codebase. Changes include: adding a new MkDocs hook script ( Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (14)
🧰 Additional context used🪛 Ruff (0.14.8)docs/scripts/strip_doctest_flags.py15-15: Unused function argument: (ARG001) ⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (28)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
clintval
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Excellent, overdue, and very welcome. Thank you!
Supersedes #161.
Adds pytest-doctestplus and fixes docstrings for doctest compatibility. Also adds a mkdocs hook to strip doctest flags from rendered docs.
📚 Documentation preview 📚: https://fgpyo--268.org.readthedocs.build/en/268/