summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_ssl.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@haypocalc.com>2010-06-11 23:56:51 (GMT)
committerVictor Stinner <victor.stinner@haypocalc.com>2010-06-11 23:56:51 (GMT)
commit313a120ab6515f1bcddb13a9403a857078a9e474 (patch)
tree7304789294142106cef3076af6249fa611f041e3 /Lib/test/test_ssl.py
parent0f35e2c0f44b2012e4e32aaccde6fa42756e61f1 (diff)
downloadcpython-313a120ab6515f1bcddb13a9403a857078a9e474.zip
cpython-313a120ab6515f1bcddb13a9403a857078a9e474.tar.gz
cpython-313a120ab6515f1bcddb13a9403a857078a9e474.tar.bz2
Issue #8969: On Windows, use mbcs codec in strict mode to encode and decode
filenames and enable os.fsencode().
Diffstat (limited to 'Lib/test/test_ssl.py')
-rw-r--r--Lib/test/test_ssl.py9
1 files changed, 4 insertions, 5 deletions
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index c464440..9c0d263 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -33,16 +33,15 @@ else:
HOST = support.HOST
data_file = lambda name: os.path.join(os.path.dirname(__file__), name)
-fsencode = lambda name: name.encode(sys.getfilesystemencoding(), "surrogateescape")
CERTFILE = data_file("keycert.pem")
-BYTES_CERTFILE = fsencode(CERTFILE)
+BYTES_CERTFILE = os.fsencode(CERTFILE)
ONLYCERT = data_file("ssl_cert.pem")
ONLYKEY = data_file("ssl_key.pem")
-BYTES_ONLYCERT = fsencode(ONLYCERT)
-BYTES_ONLYKEY = fsencode(ONLYKEY)
+BYTES_ONLYCERT = os.fsencode(ONLYCERT)
+BYTES_ONLYKEY = os.fsencode(ONLYKEY)
CAPATH = data_file("capath")
-BYTES_CAPATH = fsencode(CAPATH)
+BYTES_CAPATH = os.fsencode(CAPATH)
SVN_PYTHON_ORG_ROOT_CERT = data_file("https_svn_python_org_root.pem")