summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_sax.py
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-05-28 14:24:39 (GMT)
committerGitHub <noreply@github.com>2020-05-28 14:24:39 (GMT)
commit24bddc1b3b58f6899b2d412e51b37f68536e4fe2 (patch)
treec9960b0130a3a7f1b33e39371ffcd18037218320 /Lib/test/test_sax.py
parent84ee7e1573d166fe7a9be676813e12523b62ab24 (diff)
downloadcpython-24bddc1b3b58f6899b2d412e51b37f68536e4fe2.zip
cpython-24bddc1b3b58f6899b2d412e51b37f68536e4fe2.tar.gz
cpython-24bddc1b3b58f6899b2d412e51b37f68536e4fe2.tar.bz2
bpo-40275: Remove test.support.TESTFN_ENCODING (GH-20482)
Replace test.support.TESTFN_ENCODING with sys.getfilesystemencoding().
Diffstat (limited to 'Lib/test/test_sax.py')
-rw-r--r--Lib/test/test_sax.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py
index ce3a422..bc77103 100644
--- a/Lib/test/test_sax.py
+++ b/Lib/test/test_sax.py
@@ -19,6 +19,7 @@ from io import BytesIO, StringIO
import codecs
import os.path
import shutil
+import sys
from urllib.error import URLError
import urllib.request
from test import support
@@ -35,7 +36,7 @@ except UnicodeEncodeError:
supports_nonascii_filenames = True
if not os.path.supports_unicode_filenames:
try:
- support.TESTFN_UNICODE.encode(support.TESTFN_ENCODING)
+ support.TESTFN_UNICODE.encode(sys.getfilesystemencoding())
except (UnicodeError, TypeError):
# Either the file system encoding is None, or the file name
# cannot be encoded in the file system encoding.