@@ -94,49 +94,6 @@ def doTestStartup(self, option='', testDir='', testFile='',
94
94
if e .errno != errno .ESRCH :
95
95
raise e
96
96
97
- def testOptionsPath (self ):
98
- subdir = 'QGIS' # Linux
99
- if sys .platform [:3 ] == 'dar' : # Mac
100
- subdir = 'qgis.org'
101
- ini = os .path .join (subdir , 'QGIS3.ini' )
102
- for p in ['test_opts' , 'test opts' , 'test_optsé€' ]:
103
- self .doTestStartup (option = "--optionspath" ,
104
- testDir = os .path .join (self .TMP_DIR , p ),
105
- testFile = ini ,
106
- timeOut = 360 )
107
-
108
- def testConfigPath (self ):
109
- for p in ['test_config' , 'test config' , 'test_configé€' ]:
110
- self .doTestStartup (option = "--configpath" ,
111
- testDir = os .path .join (self .TMP_DIR , p ),
112
- testFile = "qgis.db" ,
113
- timeOut = 360 )
114
-
115
- def testPluginPath (self ):
116
- for t in ['test_plugins' , 'test plugins' , 'test_pluginsé€' ]:
117
-
118
- # get a unicode test dir
119
- testDir = os .path .join (self .TMP_DIR , t )
120
-
121
- # copy from testdata
122
- if not os .path .exists (testDir ):
123
- os .mkdir (testDir )
124
- test_plug_dir = os .path .join (TEST_DATA_DIR , 'test_plugin_path' )
125
- for item in os .listdir (test_plug_dir ):
126
- shutil .copytree (os .path .join (test_plug_dir , item ),
127
- os .path .join (testDir , item ))
128
-
129
- # we use here a minimal plugin that writes to 'plugin_started.txt'
130
- # when it is started. if QGIS_PLUGINPATH is correctly parsed, this
131
- # plugin is executed and the file is created
132
- self .doTestStartup (
133
- option = "--optionspath" ,
134
- testDir = testDir ,
135
- testFile = "plugin_started.txt" ,
136
- timeOut = 360 ,
137
- loadPlugins = True ,
138
- env = {'QGIS_PLUGINPATH' : testDir })
139
-
140
97
def testPyQgisStartupEnvVar (self ):
141
98
# verify PYQGIS_STARTUP env variable file is run by embedded interpreter
142
99
# create a temp python module that writes out test file
@@ -156,26 +113,6 @@ def testPyQgisStartupEnvVar(self):
156
113
timeOut = 360 ,
157
114
env = {'PYQGIS_STARTUP' : testmod })
158
115
159
- def testOptionsAsFiles (self ):
160
- if os .name == 'nt' :
161
- return
162
-
163
- # verify QGIS accepts filenames that match options after the special option '--'
164
- # '--help' should return immediately (after displaying the usage hints)
165
- # '-- --help' should not exit but try (and probably fail) to load a layer called '--help'
166
- with self .assertRaises (Exception ):
167
- self .doTestStartup (option = "--configpath" ,
168
- testDir = os .path .join (self .TMP_DIR , 'test_optionsAsFiles' ),
169
- testFile = "qgis.db" ,
170
- timeOut = 360 ,
171
- additionalArguments = ['--help' ])
172
- self .doTestStartup (option = "--configpath" ,
173
- testDir = os .path .join (self .TMP_DIR , 'test_optionsAsFiles' ),
174
- testFile = "qgis.db" ,
175
- timeOut = 360 ,
176
- additionalArguments = ['--' , '--help' ])
177
-
178
-
179
116
if __name__ == '__main__' :
180
117
# look for qgis bin path
181
118
QGIS_BIN = ''
0 commit comments