3 # Copyright (C) 2010-2012 CEA/DEN
5 # This library is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU Lesser General Public
7 # License as published by the Free Software Foundation; either
8 # version 2.1 of the License.
10 # This library is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public
16 # License along with this library; if not, write to the Free Software
17 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
25 testdir = os.path.dirname(os.path.realpath(__file__))
26 sys.path.append(os.path.join(testdir, '..', '..', 'src'))
27 sys.path.append(os.path.join(testdir, '..', '..', 'test', '_testTools'))
29 from salomeTools import salomeTools
32 class TestConfig(unittest.TestCase):
33 '''pyunit class : each method execute one test.
36 def test_option_copy(self):
37 '''Test the copy of a pyconf"
40 appli_to_copy = "appli-test"
44 sat.config('appli-test -c')
46 expected_file = os.path.expanduser(os.path.join('~','.salomeTools', 'Application', 'LOCAL_' + appli_to_copy + '.pyconf'))
48 if os.path.exists(expected_file):
50 os.remove(expected_file)
52 # pyunit method to compare 2 str
53 self.assertEqual(res, "OK")
56 if __name__ == '__main__':