1 # -*- coding: utf-8 -*-
12 from Editeur import session
13 from InterfaceTK import eficas_go,splash,eficas,images
17 class TestCase(unittest.TestCase):
19 self.root = Tkinter.Tk()
21 # Analyse des arguments de la ligne de commande
22 options=session.parse([])
28 init_common(None,None)
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)
55 assert j.isvalid(),j.report()