Skip to content

[Bug] unit test error: ModuleNotFoundError: No module named 'actinia_core' #15

@neteler

Description

@neteler

At time there appears to be a test error:

Example:
https://github.com/actinia-org/actinia-example-plugin/actions/runs/4964190426/jobs/8884105075

#15 9.503 ============================= test session starts ==============================
#15 9.503 platform linux -- Python 3.9.7, pytest-7.3.1, pluggy-0.13.1 -- /usr/bin/python3
#15 9.503 cachedir: .pytest_cache
#15 9.503 rootdir: /src/actinia-example-plugin
#15 9.503 configfile: setup.cfg
#15 9.503 plugins: cov-4.0.0
#15 9.503 collecting ... collected 0 items / 1 error
#15 9.897 
#15 9.897 ==================================== ERRORS ====================================
#15 9.897 _________________ ERROR collecting tests/test_resource_base.py _________________
#15 9.897 ImportError while importing test module '/src/actinia-example-plugin/tests/test_resource_base.py'.
#15 9.897 Hint: make sure your test modules/packages have valid Python names.
#15 9.897 Traceback:
#15 9.897 /usr/lib/python3.9/importlib/__init__.py:127: in import_module
#15 9.897     return _bootstrap._gcd_import(name[level:], package, level)
#15 9.897 tests/test_resource_base.py:30: in <module>
#15 9.897     from actinia_core.testsuite import ActiniaTestCaseBase, URL_PREFIX
#15 9.897 E   ModuleNotFoundError: No module named 'actinia_core'
#15 9.897 =========================== short test summary info ============================
#15 9.897 ERROR tests/test_resource_base.py
#15 9.897 !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
#15 9.897 =============================== 1 error in 0.35s ===============================
#15 10.01 make: *** [Makefile:25: unittest] Error 1
#15 ERROR: process "/bin/sh -c make unittest" did not complete successfully: exit code: 2
------
 > [10/10] RUN make unittest:
#15 9.897 /usr/lib/python3.9/importlib/__init__.py:127: in import_module
#15 9.897     return _bootstrap._gcd_import(name[level:], package, level)
#15 9.897 tests/test_resource_base.py:30: in <module>
#15 9.897     from actinia_core.testsuite import ActiniaTestCaseBase, URL_PREFIX
#15 9.897 E   ModuleNotFoundError: No module named 'actinia_core'
#15 9.897 =========================== short test summary info ============================
#15 9.897 ERROR tests/test_resource_base.py
#15 9.897 !!!!!!!!!!!!!!!!!!!!!!!!!! stopping after 1 failures !!!!!!!!!!!!!!!!!!!!!!!!!!!
#15 9.897 =============================== 1 error in 0.35s ===============================

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions