diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-07 10:09:35 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-08-07 10:09:35 (GMT) |
commit | 6c6f851eae204c3a4f85108c3d564133d58c887a (patch) | |
tree | 555d578c77274ff79bf957d7f87dbd9a67c857f3 /Lib/test/test_sax.py | |
parent | 87c9d6cf9cbf2cada6a309cf4e46d77c3484b4c2 (diff) | |
download | cpython-6c6f851eae204c3a4f85108c3d564133d58c887a.zip cpython-6c6f851eae204c3a4f85108c3d564133d58c887a.tar.gz cpython-6c6f851eae204c3a4f85108c3d564133d58c887a.tar.bz2 |
Issue #9425: skip tests if a filename is not encodable
Diffstat (limited to 'Lib/test/test_sax.py')
-rw-r--r-- | Lib/test/test_sax.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py index 9b28b3f..911e763 100644 --- a/Lib/test/test_sax.py +++ b/Lib/test/test_sax.py @@ -18,6 +18,11 @@ import unittest TEST_XMLFILE = findfile("test.xml", subdir="xmltestdata") TEST_XMLFILE_OUT = findfile("test.xml.out", subdir="xmltestdata") +try: + TEST_XMLFILE.encode("utf8") + TEST_XMLFILE_OUT.encode("utf8") +except UnicodeEncodeError: + raise unittest.SkipTest("filename is not encodable to utf8") ns_uri = "http://www.python.org/xml-ns/saxtest/" |