Skip to content
Permalink
Browse files

windows test:

* skip options startup test (--help shows a message box on windows)
* avoid initial console help
  • Loading branch information
jef-n committed Mar 11, 2017
1 parent 856d297 commit 7293c057fc29a29b5d29658146169f298fb81ff4
Showing with 11 additions and 0 deletions.
  1. +8 −0 tests/src/python/test_console.py
  2. +3 −0 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

@@ -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'

0 comments on commit 7293c05

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