File name |
Uploaded |
Description |
Edit |
tests_without_docstrings.patch
|
serhiy.storchaka,
2013-01-26 13:35
|
Patch for 3.x |
review
|
tests_without_docstrings-2.7.patch
|
serhiy.storchaka,
2013-01-26 13:36
|
Patch for 2.7 |
review
|
issue17041-decorator.diff
|
skrah,
2013-01-26 13:59
|
|
|
tests_without_docstrings-2.7_2.patch
|
serhiy.storchaka,
2013-01-26 14:28
|
|
review
|
tests_without_docstrings-3.2_2.patch
|
serhiy.storchaka,
2013-01-26 14:28
|
|
review
|
tests_without_docstrings-3.3_2.patch
|
serhiy.storchaka,
2013-01-26 14:28
|
|
review
|
tests_without_docstrings-2.7_3.patch
|
serhiy.storchaka,
2013-01-26 15:01
|
|
review
|
tests_without_docstrings-3.2_3.patch
|
serhiy.storchaka,
2013-01-26 15:01
|
|
review
|
tests_without_docstrings-3.3_3.patch
|
serhiy.storchaka,
2013-01-26 15:01
|
|
review
|
doctests_without_docstrings.patch
|
serhiy.storchaka,
2013-01-27 18:23
|
|
review
|
msg180668 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) * |
Date: 2013-01-26 13:35 |
Some tests failed when Python built without docstrings (--without-doc-strings options). Proposed patch fixes most of tests.
Only doctests in test_generators and test_genexps don't fixed. I don't know how to make doctests conditional.
[135/372] test_generators
**********************************************************************
File "/home/serhiy/py/cpython-without-doc-strings/Lib/test/test_generators.py", line ?, in test.test_generators.__test__.email
Failed example:
print(i.__next__.__doc__)
Expected:
x.__next__() <==> next(x)
Got:
<BLANKLINE>
**********************************************************************
1 items had failures:
1 of 31 in test.test_generators.__test__.email
***Test Failed*** 1 failures.
test test_generators failed -- 1 of 287 doctests failed
[137/372/1] test_genexps
**********************************************************************
File "/home/serhiy/py/cpython-without-doc-strings/Lib/test/test_genexps.py", line ?, in test.test_genexps.__test__.doctests
Failed example:
print(g.__next__.__doc__)
Expected:
x.__next__() <==> next(x)
Got:
<BLANKLINE>
**********************************************************************
1 items had failures:
1 of 75 in test.test_genexps.__test__.doctests
***Test Failed*** 1 failures.
test test_genexps failed -- 1 of 75 doctests failed
|
msg180670 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2013-01-26 13:59 |
I've already committed a decorator in 5c7f92bfe785, but it isn't
quite robust. I think the one in issue17041-decorator.diff should
do the trick.
Also, we then can use support.HAVE_DOCSTRINGS for some doctests.
|
msg180674 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) * |
Date: 2013-01-26 14:28 |
Oh, I see Stefan already fixed some failures. Here are updated patches.
|
msg180677 - (view) |
Author: R. David Murray (r.david.murray) * |
Date: 2013-01-26 14:48 |
Once upon a time (two years ago?) we fixed the tests so that they ran successfully (skipped when appropriate) with -OO set, which omits docstrings. We were checking for the optimization level (sys.flags.optimize) then. It seems like it would make more sense to combine both checks into one decorator.
|
msg180678 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) * |
Date: 2013-01-26 15:01 |
Patches updated incorporating Stefan's patch.
|
msg180679 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) * |
Date: 2013-01-26 15:07 |
> It seems like it would make more sense to combine both checks into one decorator.
These are different cases. @unittest.skipIf(sys.flags.optimize >= 2) is about docstrings in Python implemented modules, and @support.requires_docstrings is about docstrings in C implemented modules.
|
msg180687 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2013-01-26 17:16 |
Serhiy Storchaka <report@bugs.python.org> wrote:
> > It seems like it would make more sense to combine both checks into one decorator.
>
> These are different cases. @unittest.skipIf(sys.flags.optimize >= 2) is about docstrings in Python implemented modules, and @support.requires_docstrings is about docstrings in C implemented modules.
But they're always used together, aren't they? I kind of like the idea of a
single decorator. We could have two different messages "compiled without docstrings"
and "docstrings are omitted with -O2 and above", where the first message
should get priority if both conditions are true.
Given the mood on python-dev concerning --without-doc-strings, I wonder if
we should stick to minimal changes and just skip the tests in test_pydoc.py
instead of fixing them.
Personally I'm happy either way. David, what do you think?
|
msg180717 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2013-01-26 22:46 |
The patches are really small, so +1 for committing this before the
rc1 for 2.7.4 is released.
|
msg180718 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2013-01-26 22:48 |
I left some comments but have no indication that they got mailed.
|
msg180774 - (view) |
Author: R. David Murray (r.david.murray) * |
Date: 2013-01-27 15:38 |
Stefan: as Serhiy pointed out, the two parameters control different things. While it may be true that it is *likely* that someone would use both if they use one, it is not guaranteed. I think it is better to keep them separate, since while they are related operationally they are otherwise orthogonal, so linking them in the test code just seems wrong :)
|
msg180778 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2013-01-27 18:00 |
Right, keeping the cases separate is indeed clearer.
Serhiy, in case you are waiting for my "stick to minimal changes" comment to be
resolved: People apparently *do* use --without-doc-strings, so the additional
code in test_pydoc.py is really fine.
|
msg180779 - (view) |
Author: Roundup Robot (python-dev) |
Date: 2013-01-27 18:07 |
New changeset 6c0d9d1ce63e by Serhiy Storchaka in branch '2.7':
- Issue #17041: Fix testing when Python is configured with the
http://hg.python.org/cpython/rev/6c0d9d1ce63e
New changeset 241b655c23b6 by Serhiy Storchaka in branch '3.2':
Issue #17041: Fix testing when Python is configured with the
http://hg.python.org/cpython/rev/241b655c23b6
New changeset b2fa459d95d6 by Serhiy Storchaka in branch '3.3':
Issue #17041: Fix testing when Python is configured with the
http://hg.python.org/cpython/rev/b2fa459d95d6
New changeset 754112dc3bbb by Serhiy Storchaka in branch 'default':
Issue #17041: Fix testing when Python is configured with the
http://hg.python.org/cpython/rev/754112dc3bbb
|
msg180780 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) * |
Date: 2013-01-27 18:23 |
Thank you, Stefan. I got notification about your comments on email and fixed patches.
Here is a patch which fixes doctests (for 2.7 only need replace test.support by test.test_support). I'm not sure this is a right way to do conditional doctests.
|
msg180784 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2013-01-27 19:23 |
doctests_without_docstrings.patch looks good to me.
|
msg181018 - (view) |
Author: Stefan Krah (skrah) * |
Date: 2013-01-31 13:30 |
Serhiy, if you have time, I think it would be nice to get the remaining
fix into the upcoming release candidates.
|
msg181021 - (view) |
Author: Roundup Robot (python-dev) |
Date: 2013-01-31 14:13 |
New changeset df9f8feb7444 by Serhiy Storchaka in branch '2.7':
Issue #17041: Fix doctesting when Python is configured with the
http://hg.python.org/cpython/rev/df9f8feb7444
New changeset 9c0cd608464e by Serhiy Storchaka in branch '3.2':
Issue #17041: Fix doctesting when Python is configured with the
http://hg.python.org/cpython/rev/9c0cd608464e
New changeset 886f48754f7e by Serhiy Storchaka in branch '3.3':
Issue #17041: Fix doctesting when Python is configured with the
http://hg.python.org/cpython/rev/886f48754f7e
New changeset e6cc582cafce by Serhiy Storchaka in branch 'default':
Issue #17041: Fix doctesting when Python is configured with the
http://hg.python.org/cpython/rev/e6cc582cafce
|
msg181023 - (view) |
Author: Serhiy Storchaka (serhiy.storchaka) * |
Date: 2013-01-31 14:19 |
Thank you for review, Stefan Krah.
|
|
Date |
User |
Action |
Args |
2022-04-11 14:57:41 | admin | set | github: 61243 |
2013-01-31 14:19:36 | serhiy.storchaka | set | status: open -> closed resolution: fixed messages:
+ msg181023
stage: patch review -> resolved |
2013-01-31 14:13:54 | python-dev | set | messages:
+ msg181021 |
2013-01-31 13:38:41 | michael.foord | set | nosy:
- michael.foord
|
2013-01-31 13:30:21 | skrah | set | messages:
+ msg181018 |
2013-01-27 19:23:33 | skrah | set | messages:
+ msg180784 |
2013-01-27 18:23:43 | serhiy.storchaka | set | files:
+ doctests_without_docstrings.patch
messages:
+ msg180780 |
2013-01-27 18:07:45 | python-dev | set | nosy:
+ python-dev messages:
+ msg180779
|
2013-01-27 18:00:25 | skrah | set | messages:
+ msg180778 |
2013-01-27 15:38:14 | r.david.murray | set | messages:
+ msg180774 |
2013-01-26 22:48:30 | skrah | set | messages:
+ msg180718 |
2013-01-26 22:46:38 | skrah | set | messages:
+ msg180717 |
2013-01-26 17:16:20 | skrah | set | messages:
+ msg180687 |
2013-01-26 15:07:26 | serhiy.storchaka | set | messages:
+ msg180679 |
2013-01-26 15:01:26 | serhiy.storchaka | set | files:
+ tests_without_docstrings-2.7_3.patch, tests_without_docstrings-3.2_3.patch, tests_without_docstrings-3.3_3.patch
messages:
+ msg180678 |
2013-01-26 14:48:14 | r.david.murray | set | nosy:
+ r.david.murray messages:
+ msg180677
|
2013-01-26 14:28:13 | serhiy.storchaka | set | files:
+ tests_without_docstrings-2.7_2.patch, tests_without_docstrings-3.2_2.patch, tests_without_docstrings-3.3_2.patch
messages:
+ msg180674 |
2013-01-26 13:59:14 | skrah | set | files:
+ issue17041-decorator.diff
messages:
+ msg180670 |
2013-01-26 13:36:33 | serhiy.storchaka | set | files:
+ tests_without_docstrings-2.7.patch nosy:
+ pitrou, ezio.melotti, michael.foord
|
2013-01-26 13:35:37 | serhiy.storchaka | create | |