Salome HOME
dernieres modifs
[tools/eficas.git] / Tests / testihm9 / 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 session
13 from InterfaceTK import eficas_go,splash,eficas,images
14 from common import *
15
16
17 class TestCase(unittest.TestCase):
18     def setUp(self):
19         self.root = Tkinter.Tk()
20         images.update_cache()
21         # Analyse des arguments de la ligne de commande
22         options=session.parse([])
23         options.cata="v9"
24         pass
25
26     def tearDown(self):
27         self.root.destroy()
28         init_common(None,None)
29         pass
30
31     def test000(self):
32         root=self.root
33         code="ASTER"
34         splash.init_splash(root,code=code,titre="Lancement d'EFICAS pour %s" %code)
35         splash._splash.configure(text="Chargement d'EFICAS en cours.\n Veuillez patienter ...")
36         app=eficas.EFICAS(root,code=code)
37         file=os.path.join(prefs.INSTALLDIR,"Tests/testelem/az.comm")
38         j=app.bureau.openJDC(file=file)
39         jdcdisplay=app.bureau.JDCDisplay_courant
40         init_common(root,jdcdisplay)
41         jdctree=jdcdisplay.tree.tree.children[0]
42         #commentariser commande MACRO_MATR_ASSE
43         panel=select_child("MACRO_MATR_ASSE",jdctree)
44         panel=comment_command(panel)
45         #decommentariser commande MACRO_MATR_ASSE
46         panel=uncomment_command(panel)
47         #creation commande commentée
48         panel=create_command("LIRE_MAILLAGE",panel)
49         panel=comment_command(panel)
50         panel=change_commandcomm("mm=LIRE_MAILLAGE(INFO=2,UNITE=21)",panel)
51         panel=uncomment_command(panel)
52         panel=select_child("DEFI_FONCTION",jdctree)
53         delete_node(panel)
54
55         assert j.isvalid(),j.report()