[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-18 Thread STINNER Victor
Changes by STINNER Victor : -- components: +Tests resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-

[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-18 Thread Roundup Robot
Roundup Robot added the comment: New changeset c6a0f424837a by Victor Stinner in branch 'default': Fix test_compilepath() of test_compileall https://hg.python.org/cpython/rev/c6a0f424837a -- nosy: +python-dev ___ Python tracker

[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread Brett Cannon
Brett Cannon added the comment: Don't care enough to do the work to separate it out, so if you don't want to bother either then LGTM. -- ___ Python tracker ___ _

[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread Brett Cannon
Changes by Brett Cannon : -- assignee: -> haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread STINNER Victor
STINNER Victor added the comment: > A cleaner way to do what you're after is to use > test_importlib.util.import_state() where you can pass in an explicit value > for sys.path to be temporarily set. I would prefer to not couple test_importlib and test_compileall to keep tests independent. If

[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread Brett Cannon
Brett Cannon added the comment: A cleaner way to do what you're after is to use test_importlib.util.import_state() where you can pass in an explicit value for sys.path to be temporarily set. Otherwise I'm fine with the idea of the proposed change. -- _

[issue26101] Lib/test/test_compileall.py fails when run directly

2016-01-13 Thread STINNER Victor
New submission from STINNER Victor: "./python Lib/test/test_compileall.py" fails on test_compile_path() because the Lib/test/ directory is in sys.path and this directory contains invalid Python scripts like Lib/test/badsyntax_pep3120.py Attached patch fixes the issue by removing temporarely Li