This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2011年08月16日 07:18 by georg.brandl, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| t.py | georg.brandl, 2011年08月16日 07:18 | |||
| doctest.patch | r.david.murray, 2012年03月17日 19:44 | |||
| doctest.patch | r.david.murray, 2012年03月17日 19:59 | |||
| Messages (7) | |||
|---|---|---|---|
| msg142165 - (view) | Author: Georg Brandl (georg.brandl) * (Python committer) | Date: 2011年08月16日 07:18 | |
doctest.py, line 2274 (in 2.7): def shortDescription(self): return "Skipping tests from %s" % module.__name__ "module" is not defined here. Assigning to David since he last changed this line. Test script attached. |
|||
| msg142339 - (view) | Author: Michele Orrù (maker) * | Date: 2011年08月18日 15:25 | |
It is possible to retrieve the current module using _normalize_module(None), or instead use the test name (dt_test.name) just like in DocTestCase.shortDescription. Since there is no doc about it, IMHO we should use unittest's standard as guideline, which is: shortDescription() Returns a description of the test, or None if no description has been provided. The default implementation of this method returns the first line of the test method’s docstring, if available, or None. (i.e., DocTestCase._dt_test.name) What's your opinion? |
|||
| msg156194 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年03月17日 19:44 | |
The patch was actually by Brian Curtin, before he got commit privs :). Attached is a fix. I don't know what t.py has to do with the issue, though. I'm experimenting to see if I can trigger the bug before I apply the fix. |
|||
| msg156197 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年03月17日 19:59 | |
OK, ./python -OO -m test test_json will trigger it. Updated fix attached. I'm not completely happy with it, though, since it prints the 'skipping test from module XXX' twice, and I don't know why (some unittest thing I'm not getting right, doubtless). |
|||
| msg156199 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年03月17日 20:02 | |
Oh, in case anyone is wondering, the fix for -OO test runs was originally made because the unladen swallow folks ran the test suite that way. (I think someone else wanted it too, but I don't remember who). It's broken again, so I doubt anyone is actually doing this now, and if we want to keep supporting this use case (maybe we don't), then we should have a buildbot running the test suite with -OO. I might be able to set one up at some point. |
|||
| msg156505 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年03月21日 19:02 | |
New changeset 64f1b8ad9214 by R David Murray in branch '3.2': #12757: Make doctest skipping in -OO mode work with unittest/regrtest -v http://hg.python.org/cpython/rev/64f1b8ad9214 New changeset ff7957aa01a1 by R David Murray in branch 'default': Merge #12757: Make doctest skipping in -OO mode work with unittest/regrtest -v http://hg.python.org/cpython/rev/ff7957aa01a1 New changeset c50db3d06116 by R David Murray in branch '2.7': #12757: Make doctest skipping in -OO mode work with unittest/regrtest -v http://hg.python.org/cpython/rev/c50db3d06116 |
|||
| msg156506 - (view) | Author: R. David Murray (r.david.murray) * (Python committer) | Date: 2012年03月21日 19:11 | |
Since nobody really cares about this issue :), I went ahead and applied the patch that at least avoids the tracebacks. Someone can open a new bug about the duplicated message if they really care. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:20 | admin | set | github: 56966 |
| 2012年03月21日 19:11:05 | r.david.murray | set | status: open -> closed type: behavior messages: + msg156506 resolution: fixed stage: test needed -> resolved |
| 2012年03月21日 19:02:43 | python-dev | set | nosy:
+ python-dev messages: + msg156505 |
| 2012年03月17日 20:02:20 | r.david.murray | set | messages: + msg156199 |
| 2012年03月17日 19:59:51 | r.david.murray | set | files:
+ doctest.patch nosy: + michael.foord messages: + msg156197 |
| 2012年03月17日 19:47:08 | r.david.murray | set | nosy:
+ brian.curtin |
| 2012年03月17日 19:44:52 | r.david.murray | set | files:
+ doctest.patch keywords: + patch messages: + msg156194 stage: needs patch -> test needed |
| 2011年08月18日 15:25:18 | maker | set | nosy:
+ maker messages: + msg142339 |
| 2011年08月17日 11:42:18 | belopolsky | set | nosy:
+ belopolsky |
| 2011年08月16日 07:18:06 | georg.brandl | create | |