Commit 47b30474 authored by Stefan Behnel's avatar Stefan Behnel

import cleanup for xmlrunner

parent f07ad005
...@@ -880,17 +880,11 @@ if __name__ == '__main__': ...@@ -880,17 +880,11 @@ if __name__ == '__main__':
os.path.join(sys.prefix, 'lib', 'python'+sys.version[:3], 'test'), os.path.join(sys.prefix, 'lib', 'python'+sys.version[:3], 'test'),
'pyregr')) 'pyregr'))
xml_output_dir = options.xml_output_dir if options.xml_output_dir:
if xml_output_dir: sys.path.append('.')
try: from xmlrunner import XMLTestRunner
from xmlrunner import XMLTestRunner test_runner = XMLTestRunner(output=options.xml_output_dir,
except ImportError: verbose=options.verbosity > 0)
sys.stderr.write(
"Failed to import xmlrunner.XMLTestRunner, no XML output available\n")
xml_output_dir = None
if xml_output_dir:
test_runner = XMLTestRunner(output=xml_output_dir, verbose=options.verbosity > 0)
else: else:
test_runner = unittest.TextTestRunner(verbosity=options.verbosity) test_runner = unittest.TextTestRunner(verbosity=options.verbosity)
......
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