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
Make testsuite pass with -B/DONTWRITEBYTECODE set. #55629
Comments
This patch tweaks a few tests that currently rely on .pyc files being written, causing them to fail (or crash) when running 'make test TESTPYTHONOPTS=-B'. All these are purely test failures, not failures in the tested code (unlike issue bpo-11417, which is a failure in bdist_rpm instead of the test.) (This patch is for 3.1; the patch for 3.2/default is slightly different. I also have the same patch for Python 2.6/2.7, but I'm not sure if it's worth applying.) |
As per issue bpo-11417, updated to also skip the tests in distutils/tests/test_bdist_rpm.py when not writing bytecode. |
Attached an updated patch against 3.2. |
+skip_if_dont_write_bytecode = unittest.skipIf( Maybe this could be added to the test.support module? |
There are a couple more tests elsewhere that use @skipIf(sys.dont_write_bytecode, ...) directly, but I don't think it's generic enough to be moved to test.support. |
Looks fine. Can this go into 2.7 too? |
New changeset 2370ae9ee052 by Ezio Melotti in branch '3.2': New changeset c70746a0291f by Ezio Melotti in branch '2.7': New changeset 5aa5bebcd768 by Ezio Melotti in branch '3.3': New changeset 0a15a58ac4a1 by Ezio Melotti in branch 'default': |
This should be fixed now. |
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: