Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b161562 commit 0fc55a2Copy full SHA for 0fc55a2
1 file changed
Lib/test/test_platform.py
@@ -18,6 +18,12 @@ def test_architecture_via_symlink(self): # issue3762
18
# On Windows, the EXE needs to know where pythonXY.dll is at so we have
19
# to add the directory to the path.
20
if sys.platform == "win32":
21
+ def restore_environ(old_env):
22
+ os.environ.clear()
23
+ os.environ.update(old_env)
24
+
25
+ self.addCleanup(restore_environ, dict(os.environ))
26
27
os.environ["Path"] = "{};{}".format(
28
os.path.dirname(sys.executable), os.environ["Path"])
29
@@ -26,6 +32,7 @@ def get(python):
32
'import platform; print(platform.architecture())']
33
p = subprocess.Popen(cmd, stdout=subprocess.PIPE)
34
return p.communicate()
35
36
real = os.path.realpath(sys.executable)
30
37
link = os.path.abspath(support.TESTFN)
31
38
os.symlink(real, link)
0 commit comments