From: Stefan Behnel Date: Fri, 5 Mar 2010 14:05:58 +0000 (+0100) Subject: import cleanup for xmlrunner X-Git-Tag: 0.13.beta0~2^2~102^2~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=47b3047423c543c0efccbe2989e9947d4284e923;p=cython.git import cleanup for xmlrunner --- diff --git a/runtests.py b/runtests.py index 21929c50..30a1e47a 100644 --- a/runtests.py +++ b/runtests.py @@ -880,17 +880,11 @@ if __name__ == '__main__': os.path.join(sys.prefix, 'lib', 'python'+sys.version[:3], 'test'), 'pyregr')) - xml_output_dir = options.xml_output_dir - if xml_output_dir: - try: - from xmlrunner import XMLTestRunner - except ImportError: - 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) + if options.xml_output_dir: + sys.path.append('.') + from xmlrunner import XMLTestRunner + test_runner = XMLTestRunner(output=options.xml_output_dir, + verbose=options.verbosity > 0) else: test_runner = unittest.TextTestRunner(verbosity=options.verbosity)