Salome HOME
rename MODULE_*.pyconf to PRODUCT_*.pyconf
[tools/sat.git] / test / prepare / test_prepare.py
1 #!/usr/bin/env python
2 #-*- coding:utf-8 -*-
3 #  Copyright (C) 2010-2012  CEA/DEN
4 #
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.
9 #
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.
14 #
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
18
19 import unittest
20 import os
21 import sys
22 import io
23
24 # get execution path
25 testdir = os.path.dirname(os.path.realpath(__file__))
26 sys.path.append(os.path.join(testdir, '..', '..'))
27 sys.path.append(os.path.join(testdir, '..', '_testTools'))
28 sys.path.append(os.path.join(testdir, '..', '..','commands'))
29
30 from salomeTools import Sat
31 import HTMLTestRunner
32
33 sleep_time = 3
34
35 class TestLog(unittest.TestCase):
36     '''Test of the prepare command
37     '''
38     
39     def test_prepare_all(self):
40         '''Test the prepare command with many ways to prepare
41         '''
42        
43         OK = "KO"
44
45         sat = Sat()
46
47         try:
48             sat.prepare('appli-test')
49             OK = "OK"
50         except:
51             pass
52         
53
54         # pyunit method to compare 2 str
55         self.assertEqual(OK, "OK")
56         
57
58 # test launch
59 if __name__ == '__main__':
60     HTMLTestRunner.main()