[gdal-dev] hardcoded paths in the testsuite

Ben Elliston ben.elliston at anu.edu.au
Wed Apr 18 00:52:15 PDT 2018


Hi Even

I noticed that the testsuite does things like this:

sys.path.append('../pymod')
and:
sys.path.append('../gcore')

Using hard-coded relative paths makes things fragile. It means you must
be in the specific test directory for the tests to run -- it can't be
run from anywhere.  I think it would be better to rely on PYTHONPATH and
control the module loading from outside the test code. What do you think?

Cheers,
Ben


More information about the gdal-dev mailing list