[gdal-dev] Refactoring the test suite with pytest

Even Rouault even.rouault at spatialys.com
Fri Oct 26 04:11:16 PDT 2018


Craig,

I just gave a try to your branch. This is awesome work !! I'm excited by the
perspective of no longer having to write the "gdaltest.post_reason(), return 'fail'"
boilerplate.

There are just a few remaining failures that are due to conversion issues (for example in
autotest/utilities/test_gdalbuildvrt_check, a test_gdalbuildvrt_check() method
is just a helper method used by real steps, and not a test step itself), but
this is defintely on the right track.

Craig, I'll email you with the report failures that may trigger in drivers you
have not built-in support.

I got a segmentation fault right at the end of the run, after the final report,
presumably at process termination.

```
-- Docs: https://docs.pytest.org/en/latest/warnings.html
============================================================== 13 failed, 5342 passed, 437 skipped, 4 xfailed, 1 warnings, 2 error in 744.30 seconds ===============================================================
Erreur de segmentation (core dumped)
```

I ran pytest individually in each subdirectory, but couldn't reproduce that.
Will try again with core generation enabled


For those, we didn't try, an extract of the report:

./autotest$ pytest
=============================================================================================== test session starts ================================================================================================
platform linux2 -- Python 2.7.12, pytest-3.8.0, py-1.6.0, pluggy-0.7.1
rootdir: /home/even/gdal/git/gdal_pytest/autotest, inifile: pytest.ini
collected 5797 items                                                                                                                                                                                               

ogr/ogr_arcgen.py ......                                                                                                                                                                                     [  0%]
ogr/ogr_avc.py .....                                                                                                                                                                                         [  0%]
ogr/ogr_basic_test.py .........s.........                                                                                                                                                                    [  0%]
ogr/ogr_bna.py .......                                                                                                                                                                                       [  0%]
ogr/ogr_cad.py ..........                                                                                                                                                                                    [  0%]
ogr/ogr_carto.py ...s                                                                                                                                                                                        [  0%]
ogr/ogr_cloudant.py ......                                                                                                                                                                                   [  0%]
ogr/ogr_couchdb.py ....                                                                                                                                                                                      [  1%]
ogr/ogr_csv.py .............................s.........................                                                                                                                                       [  2%]
ogr/ogr_db2.py ssssssss                                                                                                                                                                                      [  2%]
ogr/ogr_db2_hack.py ...                                                                                                                                                                                      [  2%]
ogr/ogr_dgn.py ........s.                                                                                                                                                                                    [  2%]
ogr/ogr_dgnv8.py sssss.                                                                                                                                                                                      [  2%]
ogr/ogr_dxf.py .......................................................         
[...]
-- Docs: https://docs.pytest.org/en/latest/warnings.html
============================================================== 13 failed, 5342 passed, 437 skipped, 4 xfailed, 1 warnings, 2 error in 744.30 seconds ===============================================================

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com


More information about the gdal-dev mailing list