Salome HOME
Merge branch 'BR_8_3' of https://codev-tuleap.cea.fr/plugins/git/spns/SAT into BR_8_3
[tools/sat.git] / test / config / option_value_2.py
index e123f2d02b2b85dc429a04e06fb6bce4118a47e9..ba5a9c677cac07eddf6685fc2047c416719799e8 100644 (file)
@@ -23,10 +23,10 @@ import platform
 
 # get execution path
 testdir = os.path.dirname(os.path.realpath(__file__))
-sys.path.append(os.path.join(testdir, '..', '..', 'src'))
-sys.path.append(os.path.join(testdir, '..', '..', 'test', '_testTools'))
+sys.path.append(os.path.join(testdir, '..', '..'))
+sys.path.append(os.path.join(testdir, '..', '_testTools'))
 
-from salomeTools import salomeTools
+from salomeTools import Sat
 from tools import outRedirection
 import HTMLTestRunner
 
@@ -44,7 +44,7 @@ class TestConfig(unittest.TestCase):
         my_out = outRedirection()
 
         # The command to test
-        sat = salomeTools('')
+        sat = Sat('')
         sat.config('-v VARS.python')
 
         # stop output redirection
@@ -60,6 +60,60 @@ class TestConfig(unittest.TestCase):
         # pyunit method to compare 2 str
         self.assertEqual(OK, 'OK')
 
+    def test_option_schema(self):
+        '''Test the display of the right value of "sat config -s"
+        '''
+        
+        OK = 'KO'
+
+        # output redirection
+        my_out = outRedirection()
+
+        # The command to test
+        sat = Sat('')
+        sat.config('-s')
+
+        # stop output redirection
+        my_out.end_redirection()
+
+        # get results
+        res = my_out.read_results()
+        
+        
+        if 'INTERNAL' in res:
+            OK = 'OK'
+
+        # pyunit method to compare 2 str
+        self.assertEqual(OK, 'OK')
+        
+    def test_option_info(self):
+        '''Test the display of the right value of "sat config -i"
+        '''
+        
+        application = 'appli-test'
+        product = 'PRODUCT_DEV'
+        
+        OK = 'KO'
+
+        # output redirection
+        my_out = outRedirection()
+
+        # The command to test
+        sat = Sat('')
+        sat.config(application + ' --info ' + product)
+
+        # stop output redirection
+        my_out.end_redirection()
+
+        # get results
+        res = my_out.read_results()
+        
+        
+        if 'compilation method = cmake' in res:
+            OK = 'OK'
+
+        # pyunit method to compare 2 str
+        self.assertEqual(OK, 'OK')
 
 # test launch
 if __name__ == '__main__':