Open-EO / openeo-gfmap

Generic framework for EO mapping applications building on openEO
Apache License 2.0
4 stars 0 forks source link

Fix unit test setup #13

Closed soxofaan closed 5 months ago

soxofaan commented 5 months ago

spin of from #9

unit test run (e.g. in Jenkins) is broken at collection phase:

Error Message

collection failure

Stacktrace

ImportError while importing test module '/var/lib/jenkins/workspace/openeo-gfmap_issue9-jenkins-auth/tests/test_openeo_gfmap/test_s1_fetchers.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.10/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_openeo_gfmap/test_s1_fetchers.py:27: in <module>
    from .test_s2_fetchers import (
E   ImportError: attempted relative import with no known parent package

It's not recommended to share resources between test modules through imports. I'd recommend to look in to pytest fixtures for sharing/reuse of resource.

soxofaan commented 5 months ago

fixed by #26