bpo-37421: Fix test_distutils.test_build_ext()#14564
bpo-37421: Fix test_distutils.test_build_ext()#14564vstinner merged 1 commit intopython:masterfrom vstinner:distutils_cleanup
Conversation
test_distutils.test_build_ext() is now able to remove the temporary
directory on Windows: don't import the newly built C extension ("xx")
in the current process, but test it in a separated process.
aeros
left a comment
There was a problem hiding this comment.
@vstinner Thanks for changing the variable d to tmpdir on line 67 of support.py. In my opinion, non-descriptive variables can be the bane of readability.
Is there a particular reason or advantage in this case for wrapping the tests within a whitespace-stripped string instead of writing the Tests class within another file? I have no issues with it, I just haven't seen it done before.
You're welcome.
It's more convenient to put everything at the same place. It's a very common pattern if you look at the Python test suite. |
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.8. |
test_distutils.test_build_ext() is now able to remove the temporary
directory on Windows: don't import the newly built C extension ("xx")
in the current process, but test it in a separated process.
(cherry picked from commit 74c9dd5)
Co-authored-by: Victor Stinner <[email protected]>
|
GH-14571 is a backport of this pull request to the 3.8 branch. |
test_distutils.test_build_ext() is now able to remove the temporary
directory on Windows: don't import the newly built C extension ("xx")
in the current process, but test it in a separated process.
(cherry picked from commit 74c9dd5)
Co-authored-by: Victor Stinner <[email protected]>
|
@vstinner Thanks for the explanation. I'm a newer contributor, so I'm not overly familiar with the common patterns within the Python test suite. However, I definitely am a fan of how compact it is, I'll definitely keep the format in mind. After finishing up reorganization of |
test_distutils.test_build_ext() is now able to remove the temporary
directory on Windows: don't import the newly built C extension ("xx")
in the current process, but test it in a separated process.
test_distutils.test_build_ext() is now able to remove the temporary
directory on Windows: don't import the newly built C extension ("xx")
in the current process, but test it in a separated process.
test_distutils.test_build_ext() is now able to remove the temporary
directory on Windows: don't import the newly built C extension ("xx")
in the current process, but test it in a separated process.
https://bugs.python.org/issue37421