Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6fb4575

Browse filesBrowse files
author
Victor Stinner
committed
test_httpservers: Python CGI scripts have to be encoded to utf-8
And not the locale encoding. With this commit, the test finally pass on Windows with a non-ascii path :-)
1 parent 3218c31 commit 6fb4575
Copy full SHA for 6fb4575

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎Lib/test/test_httpservers.py

Copy file name to clipboardExpand all lines: Lib/test/test_httpservers.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,12 @@ def setUp(self):
321321
"Python executable path is not encodable to utf-8")
322322

323323
self.file1_path = os.path.join(self.cgi_dir, 'file1.py')
324-
with open(self.file1_path, 'w') as file1:
324+
with open(self.file1_path, 'w', encoding='utf-8') as file1:
325325
file1.write(cgi_file1 % self.pythonexe)
326326
os.chmod(self.file1_path, 0o777)
327327

328328
self.file2_path = os.path.join(self.cgi_dir, 'file2.py')
329-
with open(self.file2_path, 'w') as file2:
329+
with open(self.file2_path, 'w', encoding='utf-8') as file2:
330330
file2.write(cgi_file2 % self.pythonexe)
331331
os.chmod(self.file2_path, 0o777)
332332

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.