Skip to content

Commit b1082cf

Browse files
committed
Only set LC_ALL and LANG in test suite if not set
1 parent 08024de commit b1082cf

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

bpython/test/test_crashers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ def processExited(self, reason):
9797
),
9898
env={
9999
"TERM": "vt100",
100-
"LANG": os.environ.get("LANG", ""),
100+
"LANG": os.environ.get("LANG", "C.UTF-8"),
101101
},
102102
usePTY=(master, slave, os.ttyname(slave)),
103103
)

bpython/test/test_curtsies_painting.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import itertools
2+
import os
23
import pydoc
34
import string
45
import sys
@@ -34,7 +35,12 @@ class ClearEnviron(TestCase):
3435
@classmethod
3536
def setUpClass(cls):
3637
cls.mock_environ = mock.patch.dict(
37-
"os.environ", {"LC_LANG": "C.UTF-8", "LANG": "C.UTF-8"}, clear=True
38+
"os.environ",
39+
{
40+
"LC_ALL": os.environ.get("LC_ALL", "C.UTF-8"),
41+
"LANG": os.environ.get("LANG", "C.UTF-8"),
42+
},
43+
clear=True,
3844
)
3945
cls.mock_environ.start()
4046
TestCase.setUpClass()

0 commit comments

Comments
 (0)