From 7293c057fc29a29b5d29658146169f298fb81ff4 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Sat, 11 Mar 2017 10:59:05 +0100 Subject: [PATCH] windows test: * skip options startup test (--help shows a message box on windows) * avoid initial console help --- tests/src/python/test_console.py | 8 ++++++++ tests/src/python/test_qgsappstartup.py | 3 +++ 2 files changed, 11 insertions(+) diff --git a/tests/src/python/test_console.py b/tests/src/python/test_console.py index decaf1208829..3a81782e1cd8 100644 --- a/tests/src/python/test_console.py +++ b/tests/src/python/test_console.py @@ -13,9 +13,11 @@ __revision__ = '$Format:%H$' import qgis # NOQA +import os from qgis.testing import unittest, start_app from console import console +from qgis.PyQt.QtCore import QSettings, QCoreApplication start_app() @@ -23,6 +25,12 @@ class TestConsole(unittest.TestCase): def test_show_console(self): + if os.name == 'nt': + QCoreApplication.setOrganizationName("QGIS") + QCoreApplication.setOrganizationDomain("qgis.org") + QCoreApplication.setApplicationName("QGIS-TEST") + QSettings().setValue('pythonConsole/contextHelpOnFirstLaunch', False) + my_console = console.show_console() my_console_widget = my_console.console diff --git a/tests/src/python/test_qgsappstartup.py b/tests/src/python/test_qgsappstartup.py index d48eb14824ec..0e107a8884e5 100644 --- a/tests/src/python/test_qgsappstartup.py +++ b/tests/src/python/test_qgsappstartup.py @@ -157,6 +157,9 @@ def testPyQgisStartupEnvVar(self): env={'PYQGIS_STARTUP': testmod}) def testOptionsAsFiles(self): + if os.name == 'nt': + return + # verify QGIS accepts filenames that match options after the special option '--' # '--help' should return immediately (after displaying the usage hints) # '-- --help' should not exit but try (and probably fail) to load a layer called '--help'