[Qgis-developer] Processing tests for gdal:extractprojection -> no output file

Matthias Kuhn matthias at opengis.ch
Thu Jan 12 08:00:21 PST 2017


Hi Matteo,

I never tested this kind of smoke tests. Best to check yourself if it
works. Add a line that will raise an excpetion in an algorithm and check
if the test fails. Something like `int('oops')` as first line in
processAlgorithm() should do the trick.

You are right, there's no html file. I guess in this case it's even on
purpose that the .wld file has the same name as the original file and
another smoke test is ok. I was just thinking about an .html file based
on the content of your first message.

Matthias

On 01/12/2017 04:47 PM, matteo wrote:
> Hi Matthias,
> 
>> Adding a simple "smoke test" for createspatialindex sounds fine. One
>> that does not check results but rings the alarm if an exception is thrown.
> 
> ok fine.. just to be sure that there is the chance to just check the
> algorithm run without checking the result
> 
>> In the case of extractprojection that would work as well of course.
>> But if you are at it already, I think it's better to do things properly.
>>
>> I think there is a html file created which could be
>> * checked for correctness in a test
>> * and potentially used as input for other algorithms
> 
> I only see a dem.wld file created (or a dem.prj if the prj checkbox is
> selected) no html fiels around here
> 
>>
>> so I think that's a different case and it should be fairly simple to fix
>> the algorithm.
> 
> so are you suggesting to fix somehow the algorithm or the test related
> to the it?
> 
> Thanks again
> 
> Matteo
> 


More information about the Qgis-developer mailing list