gh-94205: Ensures all required DLLs are copied on Windows for underpth tests (GH-94206)

This commit is contained in:
Steve Dower 2022-06-24 12:39:22 +01:00 committed by GitHub
parent 92d32b9f72
commit 8d8ce130fd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -572,6 +572,8 @@ class _pthFileTests(unittest.TestCase):
dll_file = os.path.join(temp_dir, os.path.split(dll_src_file)[1])
shutil.copy(sys.executable, exe_file)
shutil.copy(dll_src_file, dll_file)
for fn in glob.glob(os.path.join(os.path.split(dll_src_file)[0], "vcruntime*.dll")):
shutil.copy(fn, os.path.join(temp_dir, os.path.split(fn)[1]))
if exe_pth:
_pth_file = os.path.splitext(exe_file)[0] + '._pth'
else: