[ZPT] CVS: Packages/TAL/tests - run.py:1.5 test_files.py:1.5
Fred Drake Jr
fdrake@acm.org
Thu, 18 Oct 2001 12:22:10 -0400
Update of /cvs-repository/Packages/TAL/tests
In directory cvs.zope.org:/tmp/cvs-serv27558/tests
Modified Files:
run.py test_files.py
Log Message:
Skip the tests that require an XML parser if TAL.tests.utils.skipxml is set.
=== Packages/TAL/tests/run.py 1.4 => 1.5 ===
import test_htmlparser
import test_htmltalparser
-import test_xmlparser
import test_talinterpreter
import test_files
@@ -14,7 +13,9 @@
suite = unittest.TestSuite()
suite.addTest(test_htmlparser.test_suite())
suite.addTest(test_htmltalparser.test_suite())
- suite.addTest(test_xmlparser.test_suite())
+ if not utils.skipxml:
+ import test_xmlparser
+ suite.addTest(test_xmlparser.test_suite())
suite.addTest(test_talinterpreter.test_suite())
suite.addTest(test_files.test_suite())
return suite
=== Packages/TAL/tests/test_files.py 1.4 => 1.5 ===
parentdir = os.path.dirname(dir)
prefix = os.path.join(dir, "input", "test*.")
- xmlargs = glob.glob(prefix + "xml")
- xmlargs.sort()
+ if utils.skipxml:
+ xmlargs = []
+ else:
+ xmlargs = glob.glob(prefix + "xml")
+ xmlargs.sort()
htmlargs = glob.glob(prefix + "html")
htmlargs.sort()
args = xmlargs + htmlargs