Fix tests and added --data option to command line

This commit is contained in:
Veronica K. B. Olsen
2020-02-26 18:27:07 +01:00
parent 0587099d36
commit 0696ef79e4
6 changed files with 39 additions and 31 deletions
+6 -1
View File
@@ -87,6 +87,7 @@ def main(sysArgs=None):
"logfile=",
"version",
"config=",
"data=",
"testmode",
"style=",
]
@@ -105,6 +106,7 @@ def main(sysArgs=None):
" -l, --logfile= Specify log file.\n"
" --style= Set Qt5 style flag. Defaults to 'Fusion'.\n"
" --config= Alternative config file.\n"
" --data= Alternative user data path.\n"
" --headless Do not display GUI. Useful for testing scripts.\n"
).format(
appname = __package__,
@@ -120,6 +122,7 @@ def main(sysArgs=None):
toFile = False
toStd = True
confPath = None
dataPath = None
testMode = False
qtStyle = "Fusion"
cmdOpen = None
@@ -157,6 +160,8 @@ def main(sysArgs=None):
qtStyle = inArg
elif inOpt in ("--config"):
confPath = inArg
elif inOpt in ("--data"):
dataPath = inArg
elif inOpt in ("--testmode"):
testMode = True
@@ -187,7 +192,7 @@ def main(sysArgs=None):
logger.setLevel(debugLevel)
CONFIG.initConfig(confPath)
CONFIG.initConfig(confPath, dataPath)
if testMode:
nwGUI = GuiMain()