@@ -140,7 +140,7 @@ def setUp(self):
140
140
print ' => ' , self .args , bcolors .WARNING ,
141
141
142
142
def runalg_none (self ):
143
- result = Sextante .runalg (self .algId , * self .args )
143
+ result = Sextante .runalg (self .alg , * self .args )
144
144
print bcolors .ENDC
145
145
self .assertIsNotNone (result , self .msg )
146
146
if not result :
@@ -178,11 +178,14 @@ def algSuite(dialog = "none", threaded = True, unthreaded = True, provider = Non
178
178
s .addTest (SextanteProviderTestCase (algId , alg , False , dialog ))
179
179
return s
180
180
181
- def modelSuite (modelFile , threaded = True , unthreaded = True ):
181
+ def modelSuite (modelFile , dialog = "none" , threaded = True , unthreaded = True ):
182
182
s = unittest .TestSuite ()
183
183
model = ModelerAlgorithm ()
184
184
model .openModel (modelFile )
185
- s .addTest (SextanteProviderTestCase (modelFile , model , True ))
185
+ if threaded :
186
+ s .addTest (SextanteProviderTestCase (modelFile , model , True , dialog ))
187
+ if unthreaded :
188
+ s .addTest (SextanteProviderTestCase (modelFile , model , False , dialog ))
186
189
return s
187
190
188
191
if __name__ == '__main__' :
@@ -204,6 +207,7 @@ def modelSuite(modelFile, threaded = True, unthreaded = True):
204
207
threaded = not args .uOnly or args .tOnly
205
208
unthreaded = not args .tOnly or args .uOnly
206
209
210
+
207
211
try :
208
212
loadSuite = unittest .TestLoader ().loadTestsFromTestCase (SextantePluginTest )
209
213
unittest .TextTestRunner (verbosity = 2 ).run (loadSuite )
@@ -213,9 +217,9 @@ def modelSuite(modelFile, threaded = True, unthreaded = True):
213
217
print "No data under %s or %s. Run with -h argument for help" % (args .raster , args .vector )
214
218
exit (1 )
215
219
if args .model :
216
- unittest .TextTestRunner (verbosity = 2 ).run (modelSuite (args .model or 'data/model' , threaded , unthreaded ))
220
+ unittest .TextTestRunner (verbosity = 2 ).run (modelSuite (args .model or 'data/model' , args . dialog , threaded , unthreaded ))
217
221
exit (0 )
218
- unittest .TextTestRunner (verbosity = 2 ).run (algSuite (args .dialog , threaded , unthreaded ))
222
+ unittest .TextTestRunner (verbosity = 2 ).run (algSuite (args .dialog , threaded , unthreaded , args . dialog ))
219
223
except KeyboardInterrupt :
220
224
print bcolors .ENDC , "Test interrupted."
221
225
0 commit comments