mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-08 00:05:09 -04:00
Set QGIS_CUSTOM_CONFIG_PATH to temporary dir for python tests
Partially fixes #34185 See also #34187
This commit is contained in:
parent
db40d88e8d
commit
c23a19793a
@ -26,6 +26,7 @@ import sys
|
|||||||
import difflib
|
import difflib
|
||||||
import functools
|
import functools
|
||||||
import filecmp
|
import filecmp
|
||||||
|
import tempfile
|
||||||
|
|
||||||
from qgis.PyQt.QtCore import QVariant
|
from qgis.PyQt.QtCore import QVariant
|
||||||
from qgis.core import QgsApplication, QgsFeatureRequest, NULL
|
from qgis.core import QgsApplication, QgsFeatureRequest, NULL
|
||||||
@ -421,6 +422,7 @@ def start_app(cleanup=True):
|
|||||||
# no need to mess with it here.
|
# no need to mess with it here.
|
||||||
QGISAPP = QgsApplication(argvb, myGuiFlag)
|
QGISAPP = QgsApplication(argvb, myGuiFlag)
|
||||||
|
|
||||||
|
os.environ['QGIS_CUSTOM_CONFIG_PATH'] = tempfile.mkdtemp('', 'QGIS-PythonTestConfigPath')
|
||||||
QGISAPP.initQgis()
|
QGISAPP.initQgis()
|
||||||
print(QGISAPP.showSettings())
|
print(QGISAPP.showSettings())
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user