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)

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':

New changeset ed0315b9da72 by Barry Warsaw in branch 'default':

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: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

issue14109 superseder

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