Reduce output from simple_cnf test to warnings
authorChristian Herdtweck <christian.herdtweck@intra2net.com>
Wed, 14 Nov 2018 10:33:26 +0000 (11:33 +0100)
committerChristian Herdtweck <christian.herdtweck@intra2net.com>
Wed, 14 Nov 2018 10:33:26 +0000 (11:33 +0100)
test/test_simple_cnf.py

index 49a77c3..4ad0486 100755 (executable)
@@ -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