Skip to content
Permalink
Browse files

Set QGIS_CUSTOM_CONFIG_PATH to temporary dir for python tests

Partially fixes #34185
See also #34187
  • Loading branch information
strk committed Feb 1, 2020
1 parent db40d88 commit c23a19793aead4d4b39233af0f46ef0dc0183f30
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 c23a197

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