mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
Issue #9425: skip tests if a filename is not encodable
This commit is contained in:
parent
87c9d6cf9c
commit
6c6f851eae
6 changed files with 29 additions and 4 deletions
|
|
@ -13,6 +13,7 @@
|
|||
|
||||
import sys
|
||||
import cgi
|
||||
import unittest
|
||||
|
||||
from test import support
|
||||
from test.support import findfile
|
||||
|
|
@ -20,6 +21,10 @@ from test.support import findfile
|
|||
from xml.etree import ElementTree as ET
|
||||
|
||||
SIMPLE_XMLFILE = findfile("simple.xml", subdir="xmltestdata")
|
||||
try:
|
||||
SIMPLE_XMLFILE.encode("utf8")
|
||||
except UnicodeEncodeError:
|
||||
raise unittest.SkipTest("filename is not encodable to utf8")
|
||||
SIMPLE_NS_XMLFILE = findfile("simple-ns.xml", subdir="xmltestdata")
|
||||
|
||||
SAMPLE_XML = """\
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue