aboutsummaryrefslogtreecommitdiff
path: root/docs/examples.rst
diff options
context:
space:
mode:
authorAlex Willmer <alex@moreati.org.uk>2015-09-06 10:48:52 +0100
committerAlex Willmer <alex@moreati.org.uk>2015-09-06 10:48:52 +0100
commitceb60f06e2e7ece138afb44f45c28ff54fe7d247 (patch)
tree645e6cccf4a35d9a61dad83c27dc0edfbcb23c29 /docs/examples.rst
parent09611c5ed5d5187a21bdd0c5bee5f0f0ff787d1c (diff)
downloaddateutil-ceb60f06e2e7ece138afb44f45c28ff54fe7d247.tar.gz
Fix slightly trickier rrule() doctest
The test is basically aanother way of writing the previous example. So for brevity it didn't include the output, but doctest struggles to tell the difference between an ellipsis representing all the output, and ellipsis used as a REPL line continuation. So I've added the first and last values of the output as a visual aid to both readers of the documentation, and doctest.
Diffstat (limited to 'docs/examples.rst')
-rw-r--r--docs/examples.rst9
1 files changed, 6 insertions, 3 deletions
diff --git a/docs/examples.rst b/docs/examples.rst
index 86b28b2..34d64cc 100644
--- a/docs/examples.rst
+++ b/docs/examples.rst
@@ -320,11 +320,14 @@ Everyday in January, for 3 years.
Same thing, in another way.
.. doctest:: rrule
+ :options: +NORMALIZE_WHITESPACE, +ELLIPSIS
>>> list(rrule(DAILY, bymonth=1,
- dtstart=parse("19980101T090000"),
- until=parse("20000131T090000")))
- (...)
+ ... dtstart=parse("19980101T090000"),
+ ... until=parse("20000131T090000")))
+ [datetime.datetime(1998, 1, 1, 9, 0),
+ ...
+ datetime.datetime(2000, 1, 31, 9, 0)]
Weekly for 10 occurrences.