if isinstance(x, Node):
return x.dump(level)
elif isinstance(x, list):
- return "[%s]" % ", ".join(dump_child(item, level) for item in x)
+ return "[%s]" % ", ".join([dump_child(item, level) for item in x])
else:
return repr(x)
module = __import__(modulename)
for x in modulename.split('.')[1:]:
module = getattr(module, x)
- suite.addTests(loader.loadTestsFromModule(module))
+ suite.addTests([loader.loadTestsFromModule(module)])
if __name__ == '__main__':
from optparse import OptionParser
if options.filetests:
filetests = TestBuilder(ROOTDIR, WORKDIR, selectors,
options.annotate_source, options.cleanup_workdir)
- test_suite.addTests(filetests.build_suite())
+ test_suite.addTests([filetests.build_suite()])
unittest.TextTestRunner(verbosity=options.verbosity).run(test_suite)