-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtest.py
51 lines (39 loc) · 1.32 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#! /usr/bin/python3
# coding: utf-8
"""Main script for Finite Elements Method."""
__author__ = "Ewen BRUN, Pierre HAON"
__email__ = "[email protected], [email protected]"
import sys
import time
from app import App, listModels
from PyQt5.QtWidgets import QApplication
def test_conditions():
"""Parse initial conditions dropdown."""
for condition in range(len(window.model.types)):
window.comboBoxConditions.setCurrentIndex(condition)
window.comboBoxSections.setCurrentIndex(1)
window.comboBoxMaterials.setCurrentIndex(1)
window.compute()
test_graphs()
def test_graphs():
"""Parse graph results dropdown."""
for result in range(2):
window.comboBoxResults.setCurrentIndex(result)
window.updateGraph()
QApplication.processEvents()
time.sleep(0.2)
if __name__ == "__main__":
app = QApplication(sys.argv)
window = App()
window._showAgain = False
window.show()
window.updateWindowSize(False)
window.elementsNumberChanged()
for model in range(len(listModels())):
window.checkBoxReparti.setChecked(False)
window.listWidget.setCurrentRow(model)
test_conditions()
if window.model._effortsRepartis:
window.checkBoxReparti.setChecked(True)
test_conditions()
sys.exit(0)