]> SALOME platform Git repositories - tools/eficas.git/blob - Tests/testihm/testihm4.py
Salome HOME
merge de la branche BR_dev_mars_06 (tag V1_10b5) dans la branche principale
[tools/eficas.git] / Tests / testihm / testihm4.py
1 # -*- coding: utf-8 -*-
2 # Modules Python
3 import os
4 import unittest
5 import difflib
6 import compare
7 import sys
8 import Tkinter
9
10 # Modules Eficas
11 import prefs
12 from Editeur import eficas_go
13 from Editeur import splash
14 from Editeur import session
15 from Editeur import eficas
16 from Editeur import images
17 from common import *
18
19
20 class TestCase(unittest.TestCase):
21     def setUp(self):
22         self.root = Tkinter.Tk()
23         images.update_cache()
24         # Analyse des arguments de la ligne de commande
25         options=session.parse([])
26         options.cata="v8.3"
27         pass
28
29     def tearDown(self):
30         self.root.destroy()
31         init_common(None,None)
32         pass
33
34     def test000(self):
35         root=self.root
36         code="ASTER"
37         splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
38         splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
39         app=eficas.EFICAS(root,code=code)
40         file=os.path.join(prefs.INSTALLDIR,"Tests/testelem/az.comm")
41         j=app.bureau.openJDC(file=file)
42         jdcdisplay=app.bureau.JDCDisplay_courant
43         init_common(root,jdcdisplay)
44         jdctree=jdcdisplay.tree.tree.children[0]
45         #commentariser commande MACRO_MATR_ASSE
46         panel=select_child("MACRO_MATR_ASSE",jdctree)
47         panel=comment_command(panel)
48         #decommentariser commande MACRO_MATR_ASSE
49         panel=uncomment_command(panel)
50         #creation commande commentée
51         panel=create_command("LIRE_MAILLAGE",panel)
52         panel=comment_command(panel)
53         panel=change_commandcomm("mm=LIRE_MAILLAGE(INFO=2,UNITE=21)",panel)
54         panel=uncomment_command(panel)
55         panel=select_child("DEFI_FONCTION",jdctree)
56         delete_node(panel)
57
58         assert j.isvalid(),j.report()