homepage

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.

Author vstinner
Recipients vstinner
Date 2017年04月20日.12:45:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1492692321.21.0.476906243501.issue30117@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2017年04月20日 12:45:21vstinnersetrecipients: + vstinner
2017年04月20日 12:45:21vstinnersetmessageid: <1492692321.21.0.476906243501.issue30117@psf.upfronthosting.co.za>
2017年04月20日 12:45:21vstinnerlinkissue30117 messages
2017年04月20日 12:45:20vstinnercreate

AltStyle によって変換されたページ (->オリジナル) /