bpo-40275: Remove test.support.TESTFN_ENCODING (GH-20482)
Replace test.support.TESTFN_ENCODING with sys.getfilesystemencoding().
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 @@
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 @@
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.