Salome HOME
projects
/
tools
/
sat.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
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_copy.py
diff --git
a/test/config/option_copy.py
b/test/config/option_copy.py
index cd80b8773f0c5c57b127d048ca4d8783798ac084..d671383d85cd4dbd2e463911ab5dda5f77f8ecff 100644
(file)
--- a/
test/config/option_copy.py
+++ b/
test/config/option_copy.py
@@
-19,31
+19,33
@@
import unittest
import os
import sys
import unittest
import os
import sys
-import shutil
# get execution path
testdir = os.path.dirname(os.path.realpath(__file__))
# 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):
import HTMLTestRunner
class TestConfig(unittest.TestCase):
- '''
pyunit class : each method execute one test.
+ '''
sat config -c
'''
def test_option_copy(self):
'''
def test_option_copy(self):
- '''Test the copy of a pyconf
"
+ '''Test the copy of a pyconf
'''
res = "KO"
appli_to_copy = "appli-test"
'''
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
# The command to test
- sat =
salomeTools
('')
+ sat =
Sat
('')
sat.config('appli-test -c')
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"
if os.path.exists(expected_file):
res = "OK"