If PyXML is installed, there is no Node.allnodes, so that portion of
the test should be skipped if that's the case.
This commit is contained in:
parent
d2909c901e
commit
6dd7d07aa6
|
@ -618,11 +618,15 @@ names.sort()
|
|||
|
||||
failed = []
|
||||
|
||||
for name in names:
|
||||
if name.startswith("test"):
|
||||
func = globals()[name]
|
||||
try:
|
||||
func()
|
||||
try:
|
||||
Node.allnodes
|
||||
except AttributeError:
|
||||
# We don't actually have the minidom from teh standard library,
|
||||
# but are picking up the PyXML version from site-packages.
|
||||
def check_allnodes():
|
||||
pass
|
||||
else:
|
||||
def check_allnodes():
|
||||
confirm(len(Node.allnodes) == 0,
|
||||
"assertion: len(Node.allnodes) == 0")
|
||||
if len(Node.allnodes):
|
||||
|
@ -634,6 +638,13 @@ for name in names:
|
|||
# are needed
|
||||
print len(Node.allnodes)
|
||||
Node.allnodes = {}
|
||||
|
||||
for name in names:
|
||||
if name.startswith("test"):
|
||||
func = globals()[name]
|
||||
try:
|
||||
func()
|
||||
check_allnodes()
|
||||
except:
|
||||
failed.append(name)
|
||||
print "Test Failed: ", name
|
||||
|
|
Loading…
Reference in New Issue