summaryrefslogtreecommitdiff
blob: bc3d1b59fef69b602f47afc5fd1c88d6e2303341 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
diff --git a/test.py b/test.py
index 68ef40c..640e5b5 100644
--- a/test.py
+++ b/test.py
@@ -515,6 +515,13 @@ def test_environment(self):
             "VERSIONER_PYTHON_VERSION",
         ]

+        # On python-3.7+, the changes for no encoding inject LC_CTYPE into subprocesses
+        py37_extra_envvars = [
+            "LC_CTYPE",
+        ]
+
+        prune_envvars = osx_cruft + py37_extra_envvars
+
         # first we test that the environment exists in our child process as
         # we've set it
         py = create_tmp_test("""
@@ -525,7 +532,7 @@ def test_environment(self):
     try: del os.environ[key]
     except: pass
 print(os.environ["HERP"] + " " + str(len(os.environ)))
-""" % osx_cruft)
+""" % prune_envvars)
         out = python(py.name, _env=env).strip()
         self.assertEqual(out, "DERP 1")

@@ -533,12 +540,12 @@ def test_environment(self):
 import os, sys
 sys.path.insert(0, os.getcwd())
 import sh
-osx_cruft = %s
-for key in osx_cruft:
+prune_envvars = %s
+for key in prune_envvars:
     try: del os.environ[key]
     except: pass
 print(sh.HERP + " " + str(len(os.environ)))
-""" % osx_cruft)
+""" % prune_envvars)
         out = python(py.name, _env=env, _cwd=THIS_DIR).strip()
         self.assertEqual(out, "DERP 1")