Skip to content
Permalink
Browse files

windows test:

* skip options startup test (--help shows a message box on windows)
* avoid initial console help

(cherry picked from commit 7293c05)
  • Loading branch information
jef-n committed Mar 11, 2017
1 parent a1e8d68 commit b0a6689a08c082cd8e50eee1d270667f885c266d
Showing with 12 additions and 2 deletions.
  1. +8 −0 tests/src/python/test_console.py
  2. +4 −2 tests/src/python/test_qgsappstartup.py
@@ -13,16 +13,24 @@
__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()


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

@@ -27,7 +27,6 @@

from qgis.testing import unittest
from utilities import unitTestDataPath
from builtins import str

print('CTEST_FULL_OUTPUT')

@@ -162,8 +161,11 @@ 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 immediatly (after displaying the usage hints)
# '--help' should return immediately (after displaying the usage hints)
# '-- --help' should not exit but try (and probably fail) to load a layer called '--help'
with self.assertRaises(Exception):
self.doTestStartup(option="--configpath",

0 comments on commit b0a6689

Please sign in to comment.
You can’t perform that action at this time.