Salome HOME
00d8e978ef96534a077897af5ac5b557c6303427
[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 from tools import check_proc_existence_and_kill
32 from tools import outRedirection
33 import HTMLTestRunner
34 import src.xmlManager
35
36 sleep_time = 3
37
38 class TestLog(unittest.TestCase):
39     '''Test of the prepare command
40     '''
41     
42     def test_prepare_all(self):
43         '''Test the prepare command with many ways to prepare
44         '''
45        
46         OK = "KO"
47
48         sat = Sat()
49
50         try:
51             sat.prepare('appli-test')
52             OK = "OK"
53         except:
54             pass
55         
56
57         # pyunit method to compare 2 str
58         self.assertEqual(OK, "OK")
59         
60
61 # test launch
62 if __name__ == '__main__':
63     HTMLTestRunner.main()