Skip to content

Commit 7b049a3

Browse files
committed
Merge 3.6
2 parents 3008bd4 + 34866e8 commit 7b049a3

2 files changed

Lines changed: 19 additions & 8 deletions

File tree

Lib/test/support/script_helper.py

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,17 +67,28 @@ def run_python_until_end(*args, **env_vars):
6767
elif not env_vars and not env_required:
6868
# ignore Python environment variables
6969
cmd_line.append('-E')
70-
# Need to preserve the original environment, for in-place testing of
71-
# shared library builds.
72-
env = os.environ.copy()
73-
# set TERM='' unless the TERM environment variable is passed explicitly
74-
# see issues #11390 and #18300
75-
if 'TERM' not in env_vars:
76-
env['TERM'] = ''
70+
7771
# But a special flag that can be set to override -- in this case, the
7872
# caller is responsible to pass the full environment.
7973
if env_vars.pop('__cleanenv', None):
8074
env = {}
75+
if sys.platform == 'win32':
76+
# Windows requires at least the SYSTEMROOT environment variable to
77+
# start Python.
78+
env['SYSTEMROOT'] = os.environ['SYSTEMROOT']
79+
80+
# Other interesting environment variables, not copied currently:
81+
# COMSPEC, HOME, PATH, TEMP, TMPDIR, TMP.
82+
else:
83+
# Need to preserve the original environment, for in-place testing of
84+
# shared library builds.
85+
env = os.environ.copy()
86+
87+
# set TERM='' unless the TERM environment variable is passed explicitly
88+
# see issues #11390 and #18300
89+
if 'TERM' not in env_vars:
90+
env['TERM'] = ''
91+
8192
env.update(env_vars)
8293
cmd_line.extend(args)
8394
proc = subprocess.Popen(cmd_line, stdin=subprocess.PIPE,

Lib/test/test_imaplib.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,7 @@ class NewIMAPTests(NewIMAPTestsMixin, unittest.TestCase):
477477

478478
@unittest.skipUnless(ssl, "SSL not available")
479479
class NewIMAPSSLTests(NewIMAPTestsMixin, unittest.TestCase):
480-
imap_class = imaplib.IMAP4_SSL
480+
imap_class = IMAP4_SSL
481481
server_class = SecureTCPServer
482482

483483
def test_ssl_raises(self):

0 commit comments

Comments
 (0)