Could not import resources in test
Opened this issue · 0 comments
priti-chahal commented
I tried to run test in py4ami on window 11
C:\Users\priti\AppData\Local\Microsoft\WindowsApps\python3.8.exe "C:/Program Files/JetBrains/PyCharm Community Edition 2022.2/plugins/python-ce/helpers/PyCharm/_jb_pytest_runner.py" --path C:/Users/priti/pyamitrail/pyami/test/test_dict.py
Testing started at 19:25 ...
Launching pytest with arguments C:/Users/priti/pyamitrail/pyami/test/test_dict.py --no-header --no-summary -q in C:\Users\priti\pyamitrail\pyami\test
============================= test session starts =============================
collecting ...
test/test_dict.py:None (test/test_dict.py)
ImportError while importing test module 'C:\Users\priti\pyamitrail\pyami\test\test_dict.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
..\..\..\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\_pytest\python.py:618: in _importtestmodule
mod = import_path(self.path, mode=importmode, root=self.config.rootpath)
..\..\..\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\_pytest\pathlib.py:533: in import_path
importlib.import_module(module_name)
C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.8_3.8.2800.0_x64__qbz5n2kfra8p0\lib\importlib\__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
<frozen importlib._bootstrap>:1014: in _gcd_import
???
<frozen importlib._bootstrap>:991: in _find_and_load
???
<frozen importlib._bootstrap>:975: in _find_and_load_unlocked
???
<frozen importlib._bootstrap>:671: in _load_unlocked
???
..\..\..\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\_pytest\assertion\rewrite.py:168: in exec_module
exec(co, module.__dict__)
test_dict.py:19: in <module>
from test.resources import Resources
E ModuleNotFoundError: No module named 'test.resources'
collected 0 items / 1 error
!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!
============================== 1 error in 0.33s ===============================
Process finished with exit code 2