Skip to content

Commit

Permalink
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
  • Loading branch information
jef-n committed Mar 11, 2017
1 parent 856d297 commit 7293c05
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/src/python/test_console.py
Expand Up @@ -13,16 +13,24 @@
__revision__ = '$Format:%H$' __revision__ = '$Format:%H$'


import qgis # NOQA import qgis # NOQA
import os


from qgis.testing import unittest, start_app from qgis.testing import unittest, start_app
from console import console from console import console
from qgis.PyQt.QtCore import QSettings, QCoreApplication


start_app() start_app()




class TestConsole(unittest.TestCase): class TestConsole(unittest.TestCase):


def test_show_console(self): 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 = console.show_console()
my_console_widget = my_console.console my_console_widget = my_console.console


Expand Down
3 changes: 3 additions & 0 deletions tests/src/python/test_qgsappstartup.py
Expand Up @@ -157,6 +157,9 @@ def testPyQgisStartupEnvVar(self):
env={'PYQGIS_STARTUP': testmod}) env={'PYQGIS_STARTUP': testmod})


def testOptionsAsFiles(self): def testOptionsAsFiles(self):
if os.name == 'nt':
return

# verify QGIS accepts filenames that match options after the special option '--' # verify QGIS accepts filenames that match options after the special option '--'
# '--help' should return immediately (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' # '-- --help' should not exit but try (and probably fail) to load a layer called '--help'
Expand Down

0 comments on commit 7293c05

Please sign in to comment.