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

Bug: pytest plugin causing runtime error #77

Closed
peterschutt opened this issue Oct 8, 2022 · 0 comments · Fixed by #78
Closed

Bug: pytest plugin causing runtime error #77

peterschutt opened this issue Oct 8, 2022 · 0 comments · Fixed by #78

Comments

@peterschutt
Copy link
Contributor

Looks like introduced in #74

app_1    |   File "/app/./app/main.py", line 14, in <module>
app_1    |     from starlite import Provide, Starlite
app_1    |   File "/usr/local/lib/python3.10/site-packages/starlite/__init__.py", line 1, in <module>
app_1    |     from starlite.app import Starlite
app_1    |   File "/usr/local/lib/python3.10/site-packages/starlite/app.py", line 11, in <module>
app_1    |     from starlite.asgi import (
app_1    |   File "/usr/local/lib/python3.10/site-packages/starlite/asgi.py", line 33, in <module>
app_1    |     from starlite.utils import AsyncCallable
app_1    |   File "/usr/local/lib/python3.10/site-packages/starlite/utils/__init__.py", line 8, in <module>
app_1    |     from .model import convert_dataclass_to_model, create_parsed_model_field
app_1    |   File "/usr/local/lib/python3.10/site-packages/starlite/utils/model.py", line 5, in <module>
app_1    |     from pydantic_factories.utils import create_model_from_dataclass
app_1    |   File "/usr/local/lib/python3.10/site-packages/pydantic_factories/__init__.py", line 11, in <module>
app_1    |     from .plugins import register_fixture
app_1    |   File "/usr/local/lib/python3.10/site-packages/pydantic_factories/plugins/__init__.py", line 1, in <module>
app_1    |     from .pytest_plugin import register_fixture
app_1    |   File "/usr/local/lib/python3.10/site-packages/pydantic_factories/plugins/pytest_plugin.py", line 6, in <module>
app_1    |     import pytest
app_1    | ModuleNotFoundError: No module named 'pytest'
peterschutt added a commit that referenced this issue Oct 8, 2022
Due to pytest generally being unavailable when the library is used ouside of testing context.

Closes #77
Goldziher pushed a commit that referenced this issue Oct 8, 2022
Due to pytest generally being unavailable when the library is used ouside of testing context.

Closes #77
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

Successfully merging a pull request may close this issue.

1 participant