Skip to content

fix: Fix all pytest warnings - #190

Merged
TechWithDunamix merged 1 commit into
sillohq:mainfrom
dmb225:feature/pytest-warnings
Oct 2, 2025
Merged

fix: Fix all pytest warnings#190
TechWithDunamix merged 1 commit into
sillohq:mainfrom
dmb225:feature/pytest-warnings

Conversation

@dmb225

@dmb225 dmb225 commented Oct 2, 2025

Copy link
Copy Markdown
Contributor

Warnings fixed:

======================================================= warnings summary ========================================================
.venv/lib/python3.13/site-packages/_pytest/config/__init__.py:1474
  /Users/dmb/code/nexios/.venv/lib/python3.13/site-packages/_pytest/config/__init__.py:1474: PytestConfigWarning: Unknown config option: asyncio_fixture_scope
  
    self._warn_or_fail_if_strict(f"Unknown config option: {key}\n")

nexios/__init__.py:196: 4 warnings
test/test_auth.py: 8 warnings
test/test_cors.py: 7 warnings
test/test_dependencies.py: 13 warnings
test/test_event.py: 4 warnings
test/test_exception_handlers.py: 10 warnings
test/test_grouping.py: 8 warnings
test/test_middleware.py: 7 warnings
test/test_pagination.py: 6 warnings
test/test_request_objects.py: 14 warnings
test/test_routing.py: 11 warnings
test/test_session.py: 3 warnings
  /Users/dmb/code/nexios/nexios/__init__.py:196: DeprecationWarning: get_application is deprecated. Please use NexiosApp instead.
    warnings.warn(

nexios/testing/client.py:16
  /Users/dmb/code/nexios/nexios/testing/client.py:16: PytestCollectionWarning: cannot collect test class 'Client' because it has a __init__ constructor (from: test/test_templating.py)
    class Client(httpx.AsyncClient):

test/test_websockets.py:86
  /Users/dmb/code/nexios/test/test_websockets.py:86: PytestCollectionWarning: cannot collect test class 'TestConsumer' because it has a __init__ constructor (from: test/test_websockets.py)
    class TestConsumer(WebSocketConsumer):

test/test_middleware.py::TestBaseMiddleware::test_base_middleware_call
  /Users/dmb/code/nexios/.venv/lib/python3.13/site-packages/_pytest/python.py:157: RuntimeWarning: coroutine 'BaseMiddleware.__call__' was never awaited
    result = testfunction(**testargs)
  Enable tracemalloc to get traceback where the object was allocated.
  See https://docs.pytest.org/en/stable/how-to/capture-warnings.html#resource-warnings for more info.

test/test_middleware.py::TestCommonMiddleware::test_common_middleware_content_length_limit
  /Users/dmb/code/nexios/.venv/lib/python3.13/site-packages/httpx/_models.py:408: DeprecationWarning: Use 'content=<...>' to upload raw bytes/text content.
    headers, stream = encode_request(

test/test_pydantic_utils.py::TestPydanticErrorHandling::test_valid_request
  /Users/dmb/code/nexios/test/test_pydantic_utils.py:134: PydanticDeprecatedSince20: The `dict` method is deprecated; use `model_dump` instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.11/migration/
    return response.json(user.dict())

test/test_request_objects.py::test_cookies
  /Users/dmb/code/nexios/nexios/testing/client.py:79: DeprecationWarning: Setting per-request cookies=<...> is being deprecated, because the expected behaviour on cookie persistence is ambiguous. Set cookies directly on the client instance instead.
    response = await super().request(

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================== 245 passed, 102 warnings in 1.70s ===============================================

@netlify

netlify Bot commented Oct 2, 2025

Copy link
Copy Markdown

👷 Deploy request for nexios-docs pending review.

Visit the deploys page to approve it

Name Link
🔨 Latest commit 32e49ca

@TechWithDunamix
TechWithDunamix merged commit 6f590be into sillohq:main Oct 2, 2025
5 checks passed
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 this pull request may close these issues.

2 participants