bimtester: merge guibimtester into bimtester module

This commit is contained in:
Bernd Hahnebach
2020-11-26 07:38:50 +01:00
committed by Dion Moult
parent 15199152ac
commit 5ce334019c
3 changed files with 31 additions and 22 deletions
+5
View File
@@ -5,6 +5,11 @@
+ ifcopenshell
### Start bimtester Gui from a shell
```
python3 ./bimtester.py -g
```
### Create a binary out of the Python package
+ The commands needs to be updated
+ Unix:
+26
View File
@@ -7,6 +7,24 @@ from bimtester import reports
from bimtester import run
def show_widget():
import sys
from PySide2 import QtWidgets
from bimtester.guiwidget import GuiWidgetBimTester
# Create the Qt Application
app = QtWidgets.QApplication(sys.argv)
# Create and show the form
form = GuiWidgetBimTester()
form.show()
# Run the main Qt loop
sys.exit(app.exec_())
if __name__ == "__main__":
parser = argparse.ArgumentParser(
@@ -44,12 +62,20 @@ if __name__ == "__main__":
help="Specify your own arguments to Python's Behave",
default=""
)
parser.add_argument(
"-g",
"--gui",
action="store_true",
help="Start with gui",
)
args = vars(parser.parse_args())
if args["purge"]:
clean.TestPurger().purge()
elif args["report"]:
reports.generate_report()
elif args["gui"]:
show_widget()
else:
run.run_tests(args)
print("# All tasks are complete :-)")
-22
View File
@@ -1,22 +0,0 @@
# TODO merge into bimtester module
import sys
from PySide2 import QtWidgets
from bimtester.guiwidget import GuiWidgetBimTester
def show_widget():
# Create the Qt Application
app = QtWidgets.QApplication(sys.argv)
# Create and show the form
form = GuiWidgetBimTester()
form.show()
# Run the main Qt loop
sys.exit(app.exec_())
if __name__ == '__main__':
show_widget()