-
Notifications
You must be signed in to change notification settings - Fork 43
ENH: adding doctest-requires-all directive #280
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -435,6 +435,29 @@ def test_requires(testdir): | |||||||||||||
| testdir.inline_run(p, '--doctest-plus', '--doctest-rst').assertoutcome(skipped=1) | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| def test_requires_all(testdir): | ||||||||||||||
| testdir.makeini( | ||||||||||||||
| """ | ||||||||||||||
| [pytest] | ||||||||||||||
| doctestplus = enabled | ||||||||||||||
| """) | ||||||||||||||
|
|
||||||||||||||
| # should be ignored | ||||||||||||||
| p = testdir.makefile( | ||||||||||||||
| '.rst', | ||||||||||||||
| """ | ||||||||||||||
| .. doctest-requires-all:: foobar | ||||||||||||||
|
|
||||||||||||||
| >>> import foobar | ||||||||||||||
|
|
||||||||||||||
| This is a narrative line, before another doctest snippet | ||||||||||||||
|
|
||||||||||||||
| >>> import foobar | ||||||||||||||
|
Comment on lines
+453
to
+455
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fix formatting to reflect typical real use case.
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should not matter, all the snippets should be collected no matter if there are |
||||||||||||||
| """ | ||||||||||||||
| ) | ||||||||||||||
| testdir.inline_run(p, '--doctest-plus', '--doctest-rst').assertoutcome(skipped=1) | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| def test_ignore_warnings_module(testdir): | ||||||||||||||
|
|
||||||||||||||
| # First check that we get a warning if we don't add the IGNORE_WARNINGS | ||||||||||||||
|
|
||||||||||||||
Uh oh!
There was an error while loading. Please reload this page.