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.

classification
Title: test_all_project_files() expected failure
Type: Stage: resolved
Components: Tests Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: barry, benjamin.peterson, eric.araujo, ezio.melotti, freiksenet, nadeem.vawda, pitrou, python-dev, skrah, vstinner
Priority: normal Keywords: patch

Created on 2011-10-07 18:38 by barry, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
i13125.patch freiksenet, 2011-10-18 10:55 Patch review
i13125-2.patch freiksenet, 2011-10-20 20:51 Patch review
Messages (10)
msg145122 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2011-10-07 18:38
In working on issue 11250, I noticed that lib2to3's test_parser.py tests were not enabled.  Fixing that was easy enough, but then test_all_project_files() in TestParserIdempotency began failing.  I've shaved enough yaks for the day so I am going to leave test_parser enabled but mark test_all_project_files() with @expectedFailure.

Note that there are a number of failures here. There are two ParseErrors, one in main.py and one in pytree_idempotency.py.  These both seem to fail on print(..., file=foo).  After that, bom.py fails idempotency because the BOM does not show up in the converted file.
msg145130 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2011-10-07 19:27
New changeset 914d3f035887 by Barry Warsaw in branch 'default':
- Re-enable lib2to3's test_parser.py tests, though with an expected failure
http://hg.python.org/cpython/rev/914d3f035887

New changeset ed0315b9da72 by Barry Warsaw in branch 'default':
- Re-enable lib2to3's test_parser.py tests, though with an expected failure
http://hg.python.org/cpython/rev/ed0315b9da72
msg145181 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-10-08 18:35
Could you arrange to silence stdout/stderr in non-verbose mode?

$ ./python -m test -uall test_lib2to3
[1/1] test_lib2to3
ParseError on file /home/antoine/cpython/default/Lib/lib2to3/main.py bad input: type=22, value='=', context=('', (81, 38))
ParseError on file /home/antoine/cpython/default/Lib/lib2to3/tests/pytree_idempotency.py bad input: type=22, value='=', context=('', (47, 33))
--- /home/antoine/cpython/default/Lib/lib2to3/tests/data/bom.py	2011-08-01 15:24:54.045209157 +0200
+++ @	2011-10-08 20:31:41.981242859 +0200
@@ -1,2 +1,2 @@
-# coding: utf-8
+# coding: utf-8
 print "BOM BOOM!"
1 test OK.
msg145795 - (view) Author: Mikhail Novikov (freiksenet) Date: 2011-10-18 10:55
I modified the tests so that they don't do prints to stdout. For that I replaced print with warnings in the "ParseError" exception except and replaced os.system with subprocess.getoutput.
msg146050 - (view) Author: Mikhail Novikov (freiksenet) Date: 2011-10-20 20:51
Updated patch to work properly with verbosity.
msg146094 - (view) Author: Barry A. Warsaw (barry) * (Python committer) Date: 2011-10-21 15:12
Note that I think it's best to fix the underlying failures rather than silence them. ;)
msg148197 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2011-11-23 17:44
Ping.
msg154501 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2012-02-27 19:00
New changeset 2fd68efac05a by Antoine Pitrou in branch '3.2':
Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode.
http://hg.python.org/cpython/rev/2fd68efac05a

New changeset e721b2b74b59 by Antoine Pitrou in branch 'default':
Issue #13125: Silence spurious test_lib2to3 output when in non-verbose mode.
http://hg.python.org/cpython/rev/e721b2b74b59
msg154502 - (view) Author: Antoine Pitrou (pitrou) * (Python committer) Date: 2012-02-27 19:01
Thank you for the patch, Mikhail. I got Benjamin to give it the ok and so it's now committed in 3.2 and 3.3!
msg291971 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-04-20 12:45
I created the issue #30117 since the bug wasn't fixed yet.
History
Date User Action Args
2022-04-11 14:57:22adminsetgithub: 57334
2017-04-20 12:45:38vstinnersetnosy: + vstinner
messages: + msg291971
2012-02-27 19:01:39pitrousetstatus: open -> closed
resolution: fixed
messages: + msg154502

stage: resolved
2012-02-27 19:00:47python-devsetmessages: + msg154501
2012-02-26 21:08:54pitrousetnosy: + nadeem.vawda, skrah
2012-02-26 21:08:44pitroulinkissue14109 superseder
2011-11-23 17:44:41pitrousetmessages: + msg148197
2011-11-18 12:28:37eric.araujosetnosy: + eric.araujo
2011-10-21 15:12:49barrysetmessages: + msg146094
2011-10-20 20:51:50freiksenetsetfiles: + i13125-2.patch

messages: + msg146050
2011-10-19 23:51:16ezio.melottisetnosy: + ezio.melotti
2011-10-18 10:55:34freiksenetsetfiles: + i13125.patch

nosy: + freiksenet
messages: + msg145795

keywords: + patch
2011-10-08 18:35:55pitrousetnosy: + pitrou
messages: + msg145181
2011-10-07 19:27:05python-devsetnosy: + python-dev
messages: + msg145130
2011-10-07 18:38:13barrycreate