]> granicus.if.org Git - python/commit
Issue #12333: run tests on the new module in a subprocess
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 17 Jun 2011 11:52:56 +0000 (13:52 +0200)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 17 Jun 2011 11:52:56 +0000 (13:52 +0200)
commit723993983a8227d7f068b072657caa2b75d4413c
tree3a1c02fbce7ffd6e3e572157f5f8e01ad280750f
parent0f270b2c37efd2c9600d9f8648918d9b3479dd94
Issue #12333: run tests on the new module in a subprocess

It is not possible to unload a module written in C, so use a subprocess to run
the tests on the module compiled by test_build_ext(). Using a subprocess, we
don't have to unload the module, save/restore sys.path, and the test can be run
more than once.

This commit fixes also an access error on rmtree() on Windows: because the
module was not really unloaded, it was not possible to remove the temporary
directory (it is not possible to remove a directory on Windows if it still
contains an open file).
Lib/packaging/tests/test_command_build_ext.py