Skip to content
Permalink
Browse files

Merge pull request #34207 from strk/test-profile-temp

Set QGIS_CUSTOM_CONFIG_PATH to temporary dir for python tests
  • Loading branch information
m-kuhn committed Feb 4, 2020
2 parents 644a552 + c23a197 commit 96a7fb8f5acf3a278919f88c7c5abc4d20b8b6c2
Showing with 2 additions and 0 deletions.
  1. +2 −0 python/testing/__init__.py
@@ -26,6 +26,7 @@
import difflib
import functools
import filecmp
import tempfile

from qgis.PyQt.QtCore import QVariant
from qgis.core import QgsApplication, QgsFeatureRequest, NULL
@@ -421,6 +422,7 @@ def start_app(cleanup=True):
# no need to mess with it here.
QGISAPP = QgsApplication(argvb, myGuiFlag)

os.environ['QGIS_CUSTOM_CONFIG_PATH'] = tempfile.mkdtemp('', 'QGIS-PythonTestConfigPath')
QGISAPP.initQgis()
print(QGISAPP.showSettings())

0 comments on commit 96a7fb8

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