Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Many tests fail due to import errors (presumably as a result of refactoring) #81

Open
vraustel opened this issue Aug 16, 2024 · 0 comments

Comments

@vraustel
Copy link

This is shown by running this command in the main dir.

for f in $(find tests -name '*py'|rg -v __init|rg -v test_utils); do pytest $f; done

(ssdg_venv) [austel@cccxl005 ~/fms-dgt]$ for f in $(find tests -name '*py'|rg -v __init|rg -v test_utils); do pytest $f; done
================================================================================================================ test session starts ================================================================================================================
platform linux -- Python 3.9.18, pytest-8.3.2, pluggy-1.5.0
rootdir: /dccstor/trail1/fms-dgt
configfile: pyproject.toml
plugins: anyio-4.4.0
collected 0 items / 1 error

====================================================================================================================== ERRORS =======================================================================================================================
__________________________________________________________________________________________________ ERROR collecting tests/dataloaders/test_file.py __________________________________________________________________________________________________
ImportError while importing test module '/dccstor/trail1/fms-dgt/tests/dataloaders/test_file.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
../anaconda3/lib/python3.9/importlib/init.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/dataloaders/test_file.py:5: in
from fms_dgt.dataloaders.file import FileDataloader
E ModuleNotFoundError: No module named 'fms_dgt.dataloaders.file'
============================================================================================================== short test summary info ==============================================================================================================
ERROR tests/dataloaders/test_file.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
================================================================================================================= 1 error in 1.22s ==================================================================================================================
================================================================================================================ test session starts ================================================================================================================
platform linux -- Python 3.9.18, pytest-8.3.2, pluggy-1.5.0
rootdir: /dccstor/trail1/fms-dgt
configfile: pyproject.toml
plugins: anyio-4.4.0
collected 1 item

tests/dataloaders/test_default.py F [100%]

===================================================================================================================== FAILURES ======================================================================================================================
________________________________________________________________________________________________________ TestDefaultDataloader.test_iterate _________________________________________________________________________________________________________

self = <tests.dataloaders.test_default.TestDefaultDataloader object at 0x7fa745737ca0>

def test_iterate(self):
    test_data = [*list(range(10))]
  dl = DefaultDataloader(data=test_data)

E TypeError: init() got an unexpected keyword argument 'data'

tests/dataloaders/test_default.py:8: TypeError

....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant