]> granicus.if.org Git - python/commit
bpo-25094: Fix test_tools.test_sundry() on Windows (GH-8406)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 23 Jul 2018 12:34:20 +0000 (05:34 -0700)
committerGitHub <noreply@github.com>
Mon, 23 Jul 2018 12:34:20 +0000 (05:34 -0700)
commit1724c0c984e6406d80d8ebe3bb7b70f23c8b5f45
treef97527fbec5c8df609dc64af96869497b9b88f3f
parente9e6495eedd7fb588964ffa50e8bf2c5ce9c6051
bpo-25094: Fix test_tools.test_sundry() on Windows (GH-8406)

When Python is installed on Windows, python -m test test_tools failed
because it tried to run Tools\scripts\2to3.py which requires an
argument. Skip this script. On other platforms or on Windows but when
run from source code (not installed), the script is called "2to3"
instead of "2to.py" and so was already skipped.

Modify also the unit test to unload all modules which have been
loaded by the test.
(cherry picked from commit 752d4b7531093c55d6f0a5846748f981d79b29d3)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Lib/test/test_tools/test_sundry.py