Skip to content

Commit

Permalink
Merge pull request #34207 from strk/test-profile-temp
Browse files Browse the repository at this point in the history
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 96a7fb8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions python/testing/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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())

Expand Down

0 comments on commit 96a7fb8

Please sign in to comment.