[ZPT] CVS: Packages/TAL - runtest.py:1.19
Fred Drake Jr
fdrake@acm.org
Thu, 18 Oct 2001 12:22:10 -0400
Update of /cvs-repository/Packages/TAL
In directory cvs.zope.org:/tmp/cvs-serv27558
Modified Files:
runtest.py
Log Message:
Skip the tests that require an XML parser if TAL.tests.utils.skipxml is set.
=== Packages/TAL/runtest.py 1.18 => 1.19 ===
import driver
+import tests.utils
def showdiff(a, b):
import ndiff
@@ -133,8 +134,11 @@
del args[0]
if not args:
prefix = os.path.join("tests", "input", "test*.")
- xmlargs = glob.glob(prefix + "xml")
- xmlargs.sort()
+ if tests.utils.skipxml:
+ xmlargs = []
+ else:
+ xmlargs = glob.glob(prefix + "xml")
+ xmlargs.sort()
htmlargs = glob.glob(prefix + "html")
htmlargs.sort()
args = xmlargs + htmlargs
@@ -149,6 +153,9 @@
if not unittesting:
print arg,
sys.stdout.flush()
+ if tests.utils.skipxml and arg[-4:] == ".xml":
+ print "SKIPPED (XML parser not available)"
+ continue
save = sys.stdout, sys.argv
try:
try: