diff --git a/tests/src/python/test_qgsappstartup.py b/tests/src/python/test_qgsappstartup.py index a0c79715cbab..3893d4cf2eac 100644 --- a/tests/src/python/test_qgsappstartup.py +++ b/tests/src/python/test_qgsappstartup.py @@ -139,20 +139,20 @@ def testPyQgisStartupEnvVar(self): # verify PYQGIS_STARTUP env variable file is run by embedded interpreter # create a temp python module that writes out test file testfile = 'pyqgis_startup.txt' - testfilepath = os.path.join(self.TMP_DIR, testfile) + testfilepath = os.path.join(self.TMP_DIR, testfile).replace('\\', '/') testcode = [ - "f = open('{0}', 'w')\n".format(testfilepath.replace('\\', '\\\\')), + "f = open('{0}', 'w')\n".format(testfilepath), "f.write('This is a test')\n", "f.close()\n" ] - testmod = os.path.join(self.TMP_DIR, 'pyqgis_startup.py') + testmod = os.path.join(self.TMP_DIR, 'pyqgis_startup.py').replace('\\', '/') f = open(testmod, 'w') f.writelines(testcode) f.close() - msg = 'Failed to create test file from executing PYQGIS_STARTUP file' + msg = 'Creation of test file by executing PYQGIS_STARTUP file failed' assert self.doTestStartup( testFile=testfilepath, - timeOut=15, + timeOut=120, env={'PYQGIS_STARTUP': testmod}), msg