X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=test%2Fconfig%2Foption_copy.py;h=d671383d85cd4dbd2e463911ab5dda5f77f8ecff;hb=e4906af5db78d7b0f7ff402b673d5702e2dee445;hp=cd80b8773f0c5c57b127d048ca4d8783798ac084;hpb=c3f03fb1a8d8a5a20baef855572c2e999433ff13;p=tools%2Fsat.git diff --git a/test/config/option_copy.py b/test/config/option_copy.py index cd80b87..d671383 100644 --- a/test/config/option_copy.py +++ b/test/config/option_copy.py @@ -19,31 +19,33 @@ import unittest import os import sys -import shutil # 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 import HTMLTestRunner class TestConfig(unittest.TestCase): - '''pyunit class : each method execute one test. + '''sat config -c ''' def test_option_copy(self): - '''Test the copy of a pyconf" + '''Test the copy of a pyconf ''' res = "KO" appli_to_copy = "appli-test" + + expected_file = os.path.expanduser(os.path.join('~','.salomeTools', 'Applications', 'LOCAL_' + appli_to_copy + '.pyconf')) + if os.path.exists(expected_file): + os.remove(expected_file) # The command to test - sat = salomeTools('') + sat = Sat('') sat.config('appli-test -c') - expected_file = os.path.expanduser(os.path.join('~','.salomeTools', 'Application', 'LOCAL_' + appli_to_copy + '.pyconf')) if os.path.exists(expected_file): res = "OK"