summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_venv.py
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2020-06-25 14:56:31 (GMT)
committerGitHub <noreply@github.com>2020-06-25 14:56:31 (GMT)
commit700cfa8c90a90016638bac13c4efd03786b2b2a0 (patch)
tree62994f7b8d6fccd910d5f65bd6cd49a4f72bf8ae /Lib/test/test_venv.py
parent8ea6353f60625c96ce96588c70ff24a77f8c71f9 (diff)
downloadcpython-700cfa8c90a90016638bac13c4efd03786b2b2a0.zip
cpython-700cfa8c90a90016638bac13c4efd03786b2b2a0.tar.gz
cpython-700cfa8c90a90016638bac13c4efd03786b2b2a0.tar.bz2
bpo-41069: Make TESTFN and the CWD for tests containing non-ascii characters. (GH-21035)
Diffstat (limited to 'Lib/test/test_venv.py')
-rw-r--r--Lib/test/test_venv.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_venv.py b/Lib/test/test_venv.py
index d3191ed..ca003d5 100644
--- a/Lib/test/test_venv.py
+++ b/Lib/test/test_venv.py
@@ -80,8 +80,8 @@ class BaseTest(unittest.TestCase):
def get_env_file(self, *args):
return os.path.join(self.env_dir, *args)
- def get_text_file_contents(self, *args):
- with open(self.get_env_file(*args), 'r') as f:
+ def get_text_file_contents(self, *args, encoding='utf-8'):
+ with open(self.get_env_file(*args), 'r', encoding=encoding) as f:
result = f.read()
return result