summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_platform.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2016-09-10 19:25:07 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2016-09-10 19:25:07 (GMT)
commitc5111b5b1ffc9e3f79006bc2623f47ba72d4af77 (patch)
tree57f77afc75063de906347495ab13f66d28bd41c2 /Lib/test/test_platform.py
parent82cb124300fe85bcd3108993158e3cbe0e2e623a (diff)
parent109bc3aa7345926c0df2b1bf97541c551f202893 (diff)
downloadcpython-c5111b5b1ffc9e3f79006bc2623f47ba72d4af77.zip
cpython-c5111b5b1ffc9e3f79006bc2623f47ba72d4af77.tar.gz
cpython-c5111b5b1ffc9e3f79006bc2623f47ba72d4af77.tar.bz2
Closes #28059: Fixes test_platform to set PYTHONPATH for .pyd files
Diffstat (limited to 'Lib/test/test_platform.py')
-rw-r--r--Lib/test/test_platform.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_platform.py b/Lib/test/test_platform.py
index 3f29613..5f875ef 100644
--- a/Lib/test/test_platform.py
+++ b/Lib/test/test_platform.py
@@ -15,8 +15,8 @@ class PlatformTest(unittest.TestCase):
@support.skip_unless_symlink
def test_architecture_via_symlink(self): # issue3762
- # On Windows, the EXE needs to know where pythonXY.dll is at so we have
- # to add the directory to the path.
+ # On Windows, the EXE needs to know where pythonXY.dll and *.pyd is at
+ # so we add the directory to the path and PYTHONPATH.
if sys.platform == "win32":
def restore_environ(old_env):
os.environ.clear()
@@ -26,6 +26,7 @@ class PlatformTest(unittest.TestCase):
os.environ["Path"] = "{};{}".format(
os.path.dirname(sys.executable), os.environ["Path"])
+ os.environ["PYTHONPATH"] = os.path.dirname(sys.executable)
def get(python):
cmd = [python, '-c',