From 888300a933b32c1edf9cdecd0d24d6b30c6c4ed5 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Mon, 12 Nov 2012 12:18:23 -0500 Subject: [PATCH] test: convert to Python 3 compatibility --- test.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test.py b/test.py index e82b419..0604528 100644 --- a/test.py +++ b/test.py @@ -62,8 +62,8 @@ def python_tree(root_path='libbe', root_modname='libbe'): def add_module_tests(suite, modname): try: mod = import_by_name(modname) - except ValueError, e: - print >> sys.stderr, 'Failed to import "%s"' % (modname) + except ValueError as e: + sys.stderr.write('Failed to import "{}"\n'.format(modname)) raise e if hasattr(mod, 'suite'): s = mod.suite @@ -92,7 +92,7 @@ those modules and their submodules. For example:: parser.add_option('-q', '--quiet', action='store_true', default=False, help='Run unittests in quiet mode (verbosity 1).') options,args = parser.parse_args() - print >> sys.stderr, 'Testing BE\n%s' % version(verbose=True) + sys.stderr.write('Testing BE\n{}\n'.format(version(verbose=True))) verbosity = 2 if options.quiet == True: -- 2.26.2