Broken unit tests caused by change of testdata

Issue #716 closed
Benjamin Jakimow created an issue

The latest change of testdata (3.9) causes breaks in some test routines:

e.g. 'import enmapboxtestdata.asd.asd' fails now.
AFAIK some special data formats have been moved into another directory of the testdata

  1. describe how to get the new, extended testdata in doc/source/dev_section/dev_enmapboxrepository.rst
  2. fix/enhance 'scripts/install_testdata.py' which should downloads all the testdata required to develop the EnMAP-Box (not only the standard example data for regular users), as it is to be used for unittesting and (future) CI pipelines
  3. if still some python packages / paths are broke, please fix them. E.g. change import enmapboxtestdata.asd.asdto the new location of the ‘asd’ example file

Comments (12)

  1. Andreas Janz

    The ASD dataset is for testing only. I moved it to the enmapboxunittestdata module:

    from enmapboxunittestdata import asd
    asd
    <module 'enmapboxunittestdata.asd' from 'D:\\source\\enmap-box-testdata\\enmapboxunittestdata\\asd\\__init__.py'>
    

  2. Benjamin Jakimow reporter

    addresses #716: earlier fix damaged argument parser. usage now: install_testdata.py [-h] [-e] [-u] [-q] <br> -e, --enmapboxtestdata Download and install EnMAP-Box testdata <br> -u, --enmapboxunittestdata Download and install EnMAP-Box unittest testdata <br> -q, --qgisresources Download and install QGIS resource files compiled as *_rc.py modules <br>

    Signed-off-by: Benjamin Jakimow benjamin.jakimow@geo.hu-berlin.de benjamin.jakimow@geo.hu-berlin.de

    → <<cset 9536fc2673c0>>

  3. Benjamin Jakimow reporter
    • changed status to open

    install_testdata.py semms still to be broken/dangerous

    1. -e --enmapboxtestdata is to install the light testdata set which is used by normal plugin users
    2. -u --enmapboxunittestdata is to install the unittestdata

    but both download from the same URL: URL_TESTDATA = fr'https://bitbucket.org/hu-geomatics/enmap-box-testdata/get/{version}.zip'

    By now, (1) would be installed to <repo>/enmapboxtestdata but (2) to <repo>/enmapboxunittestdata . This folder is not excluded in .gitignore!

    None-careful use of git might push it into the EnMAP-Box repo

  4. Benjamin Jakimow reporter

    Doesn’t make sense:

    Download https://bitbucket.org/hu-geomatics/enmap-box-testdata/get/3.9.zip
    to C:\Users\geo_beja\Repositories\enmap-box\enmapboxtestdata
    Download https://bitbucket.org/hu-geomatics/enmap-box-testdata/get/3.9.zip
    to C:\Users\geo_beja\Repositories\enmap-box\enmapboxunittestdata
    

  5. Andreas Janz

    I just replicated the logic for the normal testdata. May very well be, that something didn’t match up as expected. Let’s dicuss the details via Zoom.

  6. Andreas Janz

    BTW - why do we even need an installer for the unittestdata? Developers can just pull the repo anyways, right?

  7. Log in to comment