Salome HOME
style: black format
[tools/sat.git] / test / test_sat5_0 / compilation / test_makeinstall.py
index 62aba791ddcbacfb186e087d020c72867b72529b..6793b0a95b91533b94803ef71f774cb00a946e11 100755 (executable)
@@ -1,5 +1,5 @@
 #!/usr/bin/env python
-#-*- coding:utf-8 -*-
+# -*- coding:utf-8 -*-
 
 #  Copyright (C) 2010-2018  CEA/DEN
 #
@@ -24,46 +24,53 @@ import unittest
 import src.product
 from src.salomeTools import Sat
 
+
 class TestMakeinstall(unittest.TestCase):
     """Test of the makeinstall command"""
 
     def test_010(self):
         # Test the configure-make-makeinstall command without any option
-        OK = 'KO'
+        OK = "KO"
 
-        appli = 'appli-test'
-        product_name = 'PRODUCT_GIT'
+        appli = "appli-test"
+        product_name = "PRODUCT_GIT"
 
         sat = Sat()
-                            
-        sat.prepare(appli + ' --product ' + product_name)
-        expected_install_dir = src.product.get_product_config(sat.cfg, product_name).install_dir
-        expected_file_path = os.path.join(expected_install_dir, 'bin/hello')
-       
-        sat.configure(appli + ' --product ' + product_name)
-        
-        sat.make(appli + ' --product ' + product_name)
-        
-        sat.makeinstall(appli + ' --product ' + product_name)
-        
+
+        sat.prepare(appli + " --product " + product_name)
+        expected_install_dir = src.product.get_product_config(
+            sat.cfg, product_name
+        ).install_dir
+        expected_file_path = os.path.join(expected_install_dir, "bin/hello")
+
+        sat.configure(appli + " --product " + product_name)
+
+        sat.make(appli + " --product " + product_name)
+
+        sat.makeinstall(appli + " --product " + product_name)
+
         if os.path.exists(expected_file_path):
-            OK = 'OK'         
+            OK = "OK"
         # pyunit method to compare 2 str
-        self.assertEqual(OK, 'OK')
+        self.assertEqual(OK, "OK")
 
     def test_020(self):
         # Test the sat -h make
         OK = "KO"
 
         import makeinstall
-        
-        if "The makeinstall command executes the 'make install' command" in makeinstall.description():
+
+        if (
+            "The makeinstall command executes the 'make install' command"
+            in makeinstall.description()
+        ):
             OK = "OK"
 
         # pyunit method to compare 2 str
         self.assertEqual(OK, "OK")
 
+
 # test launch
-if __name__ == '__main__':
+if __name__ == "__main__":
     unittest.main()
     pass