diff options
author | W. Trevor King <wking@tremily.us> | 2012-11-12 12:18:23 -0500 |
---|---|---|
committer | W. Trevor King <wking@tremily.us> | 2012-11-12 12:18:23 -0500 |
commit | 888300a933b32c1edf9cdecd0d24d6b30c6c4ed5 (patch) | |
tree | efbc32aab18ad6f55953e8438e67e5b1113a633b /test.py | |
parent | 8726ab9b7169bea404032a3035563f1144582041 (diff) | |
download | bugseverywhere-888300a933b32c1edf9cdecd0d24d6b30c6c4ed5.tar.gz |
test: convert to Python 3 compatibility
Diffstat (limited to 'test.py')
-rw-r--r-- | test.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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: |