-
Notifications
You must be signed in to change notification settings - Fork 2
/
mhtestapp.py
58 lines (44 loc) · 1.68 KB
/
mhtestapp.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
52
53
54
55
56
57
58
#!/usr/bin/python3
import sys, re, platform
if sys.version_info[0] < 3 or sys.version_info[1] < 6:
print("You need at least python 3.6.0 to run these tests")
sys.exit(1)
from mhtestapp import log
log.debug("About to start testing imports")
log.debug("About to import PyQt5")
try:
from PyQt5 import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from PyQt5.QtWidgets import *
except:
log.debug("Could not import all PyQt5 related files. Things will crash later on.")
log.debug("About to import numpy")
try:
import numpy
except:
log.debug("Could not import all numpy related files. Things will crash later on.")
log.debug("Finished testing imports")
version = re.sub(r"[\r\n]"," ", sys.version)
log.debug("\nSystem, python, Qt and NumPy Version information")
log.debug("--------------------------------")
log.debug("Python version", version)
log.debug("Effective Qt version", QT_VERSION_STR)
log.debug("Effective PyQt version", PYQT_VERSION_STR)
log.debug("Effective numpy version", numpy.version.full_version)
log.debug("System platform", sys.platform)
log.debug("System executable", sys.executable)
log.debug("Platform machine", platform.machine())
log.debug("Platform processor", platform.processor())
log.debug("Platform release", platform.uname()[2])
if sys.platform.startswith('win'):
log.debug("Windows version", " ".join(platform.win32_ver()))
log.debug("--------------------------------\n")
log.debug("Entering main script")
from mhtestapp import MainWin
if __name__ == '__main__':
log.debug("About to start QApplication")
app = QApplication(sys.argv)
mainwin = MainWin()
log.debug("About to exit QApplication")
sys.exit(app.exec_())