X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test%2Fconfig%2Foption_value_2.py;h=ba5a9c677cac07eddf6685fc2047c416719799e8;hb=e4906af5db78d7b0f7ff402b673d5702e2dee445;hp=e123f2d02b2b85dc429a04e06fb6bce4118a47e9;hpb=f1223c4008ba0007e1fb6a45e1bd99ee02f1da41;p=tools%2Fsat.git diff --git a/test/config/option_value_2.py b/test/config/option_value_2.py index e123f2d..ba5a9c6 100644 --- a/test/config/option_value_2.py +++ b/test/config/option_value_2.py @@ -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__':