From: Christian Herdtweck Date: Wed, 14 Nov 2018 10:33:26 +0000 (+0100) Subject: Reduce output from simple_cnf test to warnings X-Git-Tag: v1.4~13^2~1 X-Git-Url: http://developer.intra2net.com/git/?a=commitdiff_plain;h=8468f520d8c9c8fe2b1323e098c49b4940374016;p=pyi2ncommon Reduce output from simple_cnf test to warnings --- diff --git a/test/test_simple_cnf.py b/test/test_simple_cnf.py index 49a77c3..4ad0486 100755 --- a/test/test_simple_cnf.py +++ b/test/test_simple_cnf.py @@ -109,10 +109,7 @@ def setUpModule(): ENCODING = sys.getfilesystemencoding() if ENCODING.lower() in ('ascii', 'ansi_x3.4-1968'): ENCODING = 'utf8' - print('Using fallback encoding {} for temp file creation' - .format(ENCODING)) - else: - print('Using filesystem encoding {} for temp file creation' + print('\nWARNING: Using fallback encoding {} for temp file creation' .format(ENCODING)) @@ -138,9 +135,8 @@ class SimpleCnfTest(unittest.TestCase): os.close(sys_file_descriptor) with open(cls.import_file, 'wb') as file_handle: file_handle.write(TEST_SET.encode(ENCODING)) - print('created temp file {0}'.format(cls.import_file)) except Exception: - print('exception creating temp file:') + print('\nWARNING: exception creating temp file:') print_exc() # clean up @@ -157,9 +153,8 @@ class SimpleCnfTest(unittest.TestCase): if cls.import_file is not None: try: os.unlink(cls.import_file) - print('deleted temp file {0}'.format(cls.import_file)) except Exception: - print('exception deleting temp file:') + print('\nWARNING: exception deleting temp file:') print_exc() # tests