Change settings in flake8 and black.
[python_utils.git] / tests / logging_utils_test.py
index 87c00d64e30e3a9b0a90e08658742ad0ae2739aa..a9625d621b26278567adac68a84520f618a08238 100755 (executable)
@@ -11,7 +11,6 @@ import unittest_utils as uu
 
 
 class TestLoggingUtils(unittest.TestCase):
-
     def test_output_context(self):
         unique_suffix = sutils.generate_uuid(True)
         filename = f'/tmp/logging_utils_test.{unique_suffix}'
@@ -20,11 +19,11 @@ class TestLoggingUtils(unittest.TestCase):
         with tempfile.SpooledTemporaryFile(mode='r+') as tmpfile1:
             with uu.RecordStdout() as record:
                 with lutils.OutputMultiplexerContext(
-                        lutils.OutputMultiplexer.Destination.FILENAMES |
-                        lutils.OutputMultiplexer.Destination.FILEHANDLES |
-                        lutils.OutputMultiplexer.Destination.LOG_INFO,
-                        filenames = [filename, '/dev/null'],
-                        handles = [tmpfile1, sys.stdout],
+                    lutils.OutputMultiplexer.Destination.FILENAMES
+                    | lutils.OutputMultiplexer.Destination.FILEHANDLES
+                    | lutils.OutputMultiplexer.Destination.LOG_INFO,
+                    filenames=[filename, '/dev/null'],
+                    handles=[tmpfile1, sys.stdout],
                 ) as mplex:
                     mplex.print(secret_message, end='')
 
@@ -46,8 +45,7 @@ class TestLoggingUtils(unittest.TestCase):
         with uu.RecordMultipleStreams(sys.stderr, sys.stdout) as record:
             print("This is a test!")
             print("This is one too.", file=sys.stderr)
-        self.assertEqual(record().readlines(),
-                         ["This is a test!\n", "This is one too.\n"])
+        self.assertEqual(record().readlines(), ["This is a test!\n", "This is one too.\n"])
 
 
 if __name__ == '__main__':