8000 Merge pull request #15449 from sethtroisi/refguide_doc2 · numpy/numpy@4d1a3a8 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4d1a3a8

Browse files
authored
Merge pull request #15449 from sethtroisi/refguide_doc2
DOC: Update refguide_check note on how to skip code
2 parents 96727cf + d20378b commit 4d1a3a8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tools/refguide_check.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -947,6 +947,14 @@ def check_doctests_testfile(fname, verbose, ns=None,
947947
Notes
948948
-----
949949
950+
refguide can be signalled to skip testing code by adding
951+
``#doctest: +SKIP`` to the end of the line. If the output varies or is
952+
random, add ``# may vary`` or ``# random`` to the comment. for example
953+
954+
>>> plt.plot(...) # doctest: +SKIP
955+
>>> random.randint(0,10)
956+
5 # random
957+
950958
We also try to weed out pseudocode:
951959
* We maintain a list of exceptions which signal pseudocode,
952960
* We split the text file into "blocks" of code separated by empty lines

0 commit comments

Comments
 (0)
0