Salome HOME
style: black format
[tools/sat.git] / test / test_sat5_0 / shell / test_shell.py
index 80f579e2a50a15d0841208b43278ead2d4a07069..65521be254a62ecc196237d9505704e44339a953 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-#-*- coding:utf-8 -*-
+# -*- coding:utf-8 -*-
 
 #  Copyright (C) 2010-2018  CEA/DEN
 #
@@ -23,19 +23,20 @@ import unittest
 
 from src.salomeTools import Sat
 
+
 class TestCase(unittest.TestCase):
     """Test of the shell command"""
 
     def test_010(self):
         # Test the shell command with the --command option
-        OK = 'KO'
+        OK = "KO"
         tmp_file = "/tmp/test.txt"
 
         sat = Sat("-l " + tmp_file)
-        
+
         sat.config()
         sat_way = sat.cfg.VARS.salometoolsway
-        
+
         # Execute the shell command
         sat.shell("--command ls " + sat_way)
 
@@ -44,22 +45,22 @@ class TestCase(unittest.TestCase):
         ff.close()
         os.remove(tmp_file)
         log_files = [line.replace("\n", "") for line in log_files]
-        
+
         text = open(log_files[2], "r").read()
 
         if "salomeTools.py" in text:
-            OK = 'OK'         
-        self.assertEqual(OK, 'OK')
+            OK = "OK"
+        self.assertEqual(OK, "OK")
 
     def test_020(self):
         # Test the shell command with the --command option with a failing command
-        OK = 'KO'
+        OK = "KO"
         tmp_file = "/tmp/test.txt"
 
         sat = Sat("-l " + tmp_file)
-        
+
         sat.config()
-        
+
         # Execute the shell command
         res = sat.shell("--command i_fail")
 
@@ -68,24 +69,25 @@ class TestCase(unittest.TestCase):
         ff.close()
         os.remove(tmp_file)
         log_files = [line.replace("\n", "") for line in log_files]
-        
+
         text = open(log_files[2], "r").read()
 
         if "i_fail" in text and res == 1:
-            OK = 'OK'         
-        self.assertEqual(OK, 'OK')
+            OK = "OK"
+        self.assertEqual(OK, "OK")
 
     def test_030(self):
         # Test the sat -h shell
         OK = "KO"
 
         import shell
-        
+
         if "Executes the shell command passed as argument" in shell.description():
             OK = "OK"
         self.assertEqual(OK, "OK")
 
+
 # test launch
-if __name__ == '__main__':
+if __name__ == "__main__":
     unittest.main()
     pass