Issue 13125: test_all_project_files() expected failure (original) (raw)
Created on 2011-10-07 18:38 by barry, last changed 2022-04-11 14:57 by admin. This issue is now closed.
Messages (10)
Author: Barry A. Warsaw (barry) *
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.
Author: Roundup Robot (python-dev)
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
Author: Antoine Pitrou (pitrou) *
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.
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.
Author: Mikhail Novikov (freiksenet)
Date: 2011-10-20 20:51
Updated patch to work properly with verbosity.
Author: Barry A. Warsaw (barry) *
Date: 2011-10-21 15:12
Note that I think it's best to fix the underlying failures rather than silence them. ;)
Author: Antoine Pitrou (pitrou) *
Date: 2011-11-23 17:44
Ping.
Author: Roundup Robot (python-dev)
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
Author: Antoine Pitrou (pitrou) *
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!
Author: STINNER Victor (vstinner) *
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:22
admin
set
github: 57334
2017-04-20 12:45:38
vstinner
set
nosy: + vstinner
messages: +
2012-02-27 19:01:39
pitrou
set
status: open -> closed
resolution: fixed
messages: +
stage: resolved
2012-02-27 19:00:47
python-dev
set
messages: +
2012-02-26 21:08:54
pitrou
set
nosy: + nadeem.vawda, skrah
2012-02-26 21:08:44
pitrou
link
2011-11-23 17:44:41
pitrou
set
messages: +
2011-11-18 12:28:37
eric.araujo
set
nosy: + eric.araujo
2011-10-21 15:12:49
barry
set
messages: +
2011-10-20 20:51:50
freiksenet
set
files: + i13125-2.patch
messages: +
2011-10-19 23:51:16
ezio.melotti
set
nosy: + ezio.melotti
2011-10-18 10:55:34
freiksenet
set
files: + i13125.patch
nosy: + freiksenet
messages: +
keywords: + patch
2011-10-08 18:35:55
pitrou
set
nosy: + pitrou
messages: +
2011-10-07 19:27:05
python-dev
set
nosy: + python-dev
messages: +
2011-10-07 18:38:13
barry
create