Files
MINGW-packages/mingw-w64-python/0132-Add-a-test-for-checking-the-new-launchers.patch
2022-06-10 17:54:24 +02:00

37 lines
1.3 KiB
Diff

From 6cf9a3f4d4d6eeb38a08ed212d566af5f35987de Mon Sep 17 00:00:00 2001
From: Naveen M K <naveen521kk@gmail.com>
Date: Wed, 9 Mar 2022 11:05:51 +0530
Subject: [PATCH 132/N] Add a test for checking the new launchers
---
mingw_smoketests.py | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/mingw_smoketests.py b/mingw_smoketests.py
index 8e4bd50..fa03ddf 100644
--- a/mingw_smoketests.py
+++ b/mingw_smoketests.py
@@ -193,6 +193,19 @@ class Tests(unittest.TestCase):
assert os.path.exists(os.path.join(tmp, "bin", "python.exe"))
assert os.path.exists(os.path.join(tmp, "bin", "python3.exe"))
subprocess.check_call([shutil.which("bash.exe"), os.path.join(tmp, "bin", "activate")])
+ # This will not work in in-tree build
+ if not sysconfig.is_python_build():
+ env = os.environ.copy()
+ env['PATH'] = 'foo;bar'
+ subprocess.check_call(
+ [
+ os.path.join(tmp, "bin", "python.exe"),
+ "-c",
+ "print('Hello World')"
+ ],
+ env=env,
+ cwd=tmp,
+ )
def test_has_mktime(self):
from time import mktime, gmtime
--
2.36.1