Skip to content

Commit f81c059

Browse files
committedNov 18, 2014
fix PyQgsAppStartup test on windows
1 parent dfbe8f3 commit f81c059

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed
 

‎tests/src/python/test_qgsappstartup.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ def doTestStartup(self, option='', testDir='', testFile='',
6060
os.mkdir(testDir)
6161
myTestFile = os.path.join(testDir, testFile)
6262

63-
# print 'myTestFile: ', myTestFile
64-
6563
if os.path.exists(myTestFile):
6664
os.remove(myTestFile)
6765

@@ -71,7 +69,7 @@ def doTestStartup(self, option='', testDir='', testFile='',
7169
# whether to enable GUI customization
7270
customize = '' if customization else '--nocustomization'
7371

74-
# environnement variables = system variables + provided 'env'
72+
# environment variables = system variables + provided 'env'
7573
myenv = os.environ.copy()
7674
if env is not None:
7775
myenv.update(env)
@@ -141,7 +139,7 @@ def testPyQgisStartupEnvVar(self):
141139
testfile = 'pyqgis_startup.txt'
142140
testfilepath = os.path.join(self.TMP_DIR, testfile)
143141
testcode = [
144-
"f = open('{0}', 'w')\n".format(testfilepath),
142+
"f = open('{0}', 'w')\n".format(testfilepath.replace('\\','\\\\')),
145143
"f.write('This is a test')\n",
146144
"f.close()\n"
147145
]

0 commit comments

Comments
 (0)
Please sign in to comment.