From d20378b457813279e75db41840276a8f8e711434 Mon Sep 17 00:00:00 2001 From: Seth Troisi Date: Mon, 27 Jan 2020 11:23:18 -0800 Subject: [PATCH] DOC: Update refguide_check note on how to skip code --- tools/refguide_check.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tools/refguide_check.py b/tools/refguide_check.py index ad3f93c42d8b..33c50818b7bb 100644 --- a/tools/refguide_check.py +++ b/tools/refguide_check.py @@ -947,6 +947,14 @@ def check_doctests_testfile(fname, verbose, ns=None, Notes ----- + refguide can be signalled to skip testing code by adding + ``#doctest: +SKIP`` to the end of the line. If the output varies or is + random, add ``# may vary`` or ``# random`` to the comment. for example + + >>> plt.plot(...) # doctest: +SKIP + >>> random.randint(0,10) + 5 # random + We also try to weed out pseudocode: * We maintain a list of exceptions which signal pseudocode, * We split the text file into "blocks" of code separated by empty lines