Skip to content

Could not import resources in test #27

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

Open
priti-chahal opened this issue Dec 29, 2022 · 0 comments
Open

Could not import resources in test #27

priti-chahal opened this issue Dec 29, 2022 · 0 comments

Comments

@priti-chahal
Copy link

priti-chahal commented Dec 29, 2022

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

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