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

ModuleNotFoundError: No module named 'test' in tests/test_impl.py #30

Closed
mweinelt opened this issue Dec 14, 2023 · 0 comments · Fixed by #31
Closed

ModuleNotFoundError: No module named 'test' in tests/test_impl.py #30

mweinelt opened this issue Dec 14, 2023 · 0 comments · Fixed by #31
Labels
bug Something isn't working

Comments

@mweinelt
Copy link

mweinelt commented Dec 14, 2023

Describe the bug
Using a python:3.11.7 docker container I run into the following import error when running the test suite.

ImportError while importing test module '/root/aiohappyeyeballs/tests/test_impl.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/local/lib/python3.11/importlib/__init__.py:126: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
tests/test_impl.py:3: in <module>
    from test.test_asyncio import utils as test_utils
E   ModuleNotFoundError: No module named 'test'

To Reproduce
Steps to reproduce the behavior:

git clone https://github.com/bdraco/aiohappyeyeballs
cd aiohappyeyeballs/
poetry install
poetry run pytest

Additional context
The test module is documented for internal use by the python interpreter and apparently not present in all Python distributions.

The test package is meant for internal use by Python only. It is documented for the benefit of the core developers of Python. Any use of this package outside of Python’s standard library is discouraged as code mentioned here can change or be removed without notice between releases of Python.

https://docs.python.org//3.12/library/test.html#module-test

@mweinelt mweinelt added the bug Something isn't working label Dec 14, 2023
bdraco added a commit that referenced this issue Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant