New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test_all_project_files() expected failure #57334
Comments
In working on bpo-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. |
New changeset 914d3f035887 by Barry Warsaw in branch 'default':
New changeset ed0315b9da72 by Barry Warsaw in branch 'default':
|
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. |
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. |
Updated patch to work properly with verbosity. |
Note that I think it's best to fix the underlying failures rather than silence them. ;) |
Ping. |
New changeset 2fd68efac05a by Antoine Pitrou in branch '3.2': New changeset e721b2b74b59 by Antoine Pitrou in branch 'default': |
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! |
I created the issue bpo-30117 since the bug wasn't fixed yet. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: