Commit 4696e550 authored by Fred Drake's avatar Fred Drake

Set a "skipxml" flag if the XML parsers are not available.

This will be used by the modules that control the inclusion of XML tests.
parent 780ac37a
......@@ -12,6 +12,18 @@ if codedir not in sys.path:
import unittest
# Set skipxml to true if an XML parser could not be found.
skipxml = 0
try:
import pyexpat
except ImportError:
try:
# the C extension in PyXML
import xml.parsers.pyexpat
except ImportError:
skipxml = 1
def run_suite(suite, outf=None, errf=None):
if outf is None:
outf = sys.stdout
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment