Skip to content


windows test:
Browse files Browse the repository at this point in the history
* 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 b0a6689
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions tests/src/python/
Expand Up @@ -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


class TestConsole(unittest.TestCase):

def test_show_console(self):
if == 'nt':
QSettings().setValue('pythonConsole/contextHelpOnFirstLaunch', False)

my_console = console.show_console()
my_console_widget = my_console.console

Expand Down
6 changes: 4 additions & 2 deletions tests/src/python/
Expand Up @@ -27,7 +27,6 @@

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


Expand Down Expand Up @@ -162,8 +161,11 @@ def testPyQgisStartupEnvVar(self):
env={'PYQGIS_STARTUP': testmod})

def testOptionsAsFiles(self):
if == 'nt':

# 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):
Expand Down

0 comments on commit b0a6689

Please sign in to comment.