Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 87bbf25 commit d9e9528Copy full SHA for d9e9528
1 file changed
Lib/test/test_httpservers.py
@@ -277,6 +277,13 @@ def test_undecodable_filename(self):
277
with open(os.path.join(self.tempdir, filename), 'wb') as f:
278
f.write(support.TESTFN_UNDECODABLE)
279
response = self.request(self.tempdir_name + '/')
280
+ if sys.platform == 'darwin':
281
+ # On Mac OS the HFS+ filesystem replaces bytes that aren't valid
282
+ # UTF-8 into a percent-encoded value.
283
+ for name in os.listdir(self.tempdir):
284
+ if name != 'test': # Ignore a filename created in setUp().
285
+ filename = name
286
+ break
287
body = self.check_status_and_reason(response, 200)
288
quotedname = urllib.parse.quote(filename, errors='surrogatepass')
289
self.assertIn(('href="%s"' % quotedname)
0 commit comments