DARMA-tasking / LB-analysis-framework

Analysis framework for exploring, testing, and comparing load balancing strategies
Other
3 stars 1 forks source link

Schema validator helper relative import fail #372

Closed pierrepebay closed 1 year ago

pierrepebay commented 1 year ago

When running tox, we have the following import error:

======================================================================
  ERROR: test_schema_validator (unittest.loader._FailedTest)
  ----------------------------------------------------------------------
  ImportError: Failed to import test module: test_schema_validator
  Traceback (most recent call last):
    File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/unittest/loader.py", line 436, in _find_test_path
      module = self._get_module_from_name(name)
    File "/opt/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/unittest/loader.py", line 377, in _get_module_from_name
      __import__(name)
    File "/home/runner/work/LB-analysis-framework/LB-analysis-framework/tests/test_schema_validator.py", line 15, in <module>
      from .utils.schema_validator_helper import check_and_get_schema_validator
  ImportError: attempted relative import with no known parent package

  ----------------------------------------------------------------------

This error is also present in the CI action for code quality.