Message291970
The test_lib2to3.test_parser.test_all_project_files() test fails and produces an annoying output. See the issue #13125
Example of a buildbot:
0:11:09 [398/404] test_lib2to3 passed (39 sec)
--- /root/buildarea/3.x.angelico-debian-amd64/build/Lib/lib2to3/tests/data/bom.py 2017-02-11 12:20:43.532000000 +1100
+++ @ 2017-04-20 22:05:37.157911808 +1000
@@ -1,2 +1,2 @@
-# coding: utf-8
+# coding: utf-8
print "BOM BOOM!"
Example by running: ./python -m test -v test_lib2to3
---
test_all_project_files (lib2to3.tests.test_parser.TestParserIdempotency) ... /home/haypo/prog/python/master/Lib/lib2to3/tests/test_parser.py:393: UserWarning: ParseError on file /home/haypo/prog/python/master/Lib/lib2to3/main.py (bad input: type=22, value='=', context=('', (130, 38)))
warnings.warn('ParseError on file %s (%s)' % (filepath, err))
/home/haypo/prog/python/master/Lib/lib2to3/tests/test_parser.py:393: UserWarning: ParseError on file /home/haypo/prog/python/master/Lib/lib2to3/tests/pytree_idempotency.py (bad input: type=22, value='=', context=('', (49, 33)))
warnings.warn('ParseError on file %s (%s)' % (filepath, err))
--- /home/haypo/prog/python/master/Lib/lib2to3/tests/data/bom.py 2017-02-10 23:10:03.392778645 +0100
+++ @ 2017-04-20 14:32:49.921613096 +0200
@@ -1,2 +1,2 @@
-# coding: utf-8
+# coding: utf-8
print "BOM BOOM!"
expected failure
---
The test fails to parse the following code:
---
from __future__ import print_function
import sys
print("WARNING", file=sys.stderr)
---
whereas lib2to3 is able to parse the code. It seems like the code uses a lib2to3.tests.support.driver object. Maybe this object lacks the fixer which parses the __future__ imports?
The minimum fix would be to make the test quiet: remove the warning, don't log anything.
The best would be fix the test. |
|
Date |
User |
Action |
Args |
2017-04-20 12:45:21 | vstinner | set | recipients:
+ vstinner |
2017-04-20 12:45:21 | vstinner | set | messageid: <1492692321.21.0.476906243501.issue30117@psf.upfronthosting.co.za> |
2017-04-20 12:45:21 | vstinner | link | issue30117 messages |
2017-04-20 12:45:20 | vstinner | create | |
|