Opened 7 years ago

Closed 5 years ago

#11436 closed Bug (fixed) needs updating

Reported by: Karen Tracey Owned by: nobody
Component: Testing framework Version: 1.0
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


I just tried annotating a doctest in a file with the +SKIP directive and was puzzled to find that that resulted in all doctests in that file being ignored. Apparently the doctest runner bails (silently?) on any directives it doesn't understand, and as the used by Django is from Python 2.4 and +SKIP was added for 2.5, Django's doctest runner doesn't understand +SKIP.

I think we need to look into updating to include support for options/directives like this that have been added since 2.4. If I'm running Python 2.5 or 2.6 I expect to have access to the things added for those releases -- I haven't been able to find that we even document that Django uses it's own customized doctest runner? (It might be somewhat confusing for people running older levels if they happen to notice they can use newer options, but that doesn't really strike me as a problem.)

(Better would be to be able to use the Python doctest, if running a high enough Python level, but that level doesn't appear to exist yet. Python issue 1521051 ( has not made it into the code base yet, it's sitting in "test needed" stage.)

Change History (6)

comment:1 Changed 7 years ago by Alex Gaynor

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedAccepted

comment:2 Changed 7 years ago by Luc Saffre

It would already be a good workaround to change the current so that it no longer silently ignores such errors.
If you get an error message then you don't lose time figuring out where it comes from.
I documented a related experience:

comment:3 Changed 6 years ago by Julien Phalip

Resolution: wontfix
Severity: Normal
Status: newclosed
Type: Uncategorized

Django does not support Python 2.4 any more (and it also discourages the use of doctests).

comment:4 Changed 6 years ago by Julien Phalip

Resolution: wontfix
Status: closedreopened

Apologies, you're right in that the module should be updated.

comment:5 Changed 5 years ago by Julien Phalip

Type: UncategorizedBug

comment:6 Changed 5 years ago by Ramiro Morales

Resolution: fixed
Status: reopenedclosed

In [16292]:

Fixed #11436 -- Updated bundled copy of to the one shipped with Python 2.5, preserved local tweaks.

Note: See TracTickets for help on using tickets.
Back to Top