Skip to content

Close remaining unit test gaps and tidy test noise #144

Closed

Description

@cvas22

Follow-up to #137 after #138-#141 and #143 were merged. CI now reports coverage: 92% on master (Tests 3.14 job on #143).

Remaining meaningful gaps:

  • util.RequestUtil.get_request_from_call_stack: the req local, the any-local fallback and the calling-frame search are untested.
  • JSONLogFormatter.get_exc_fields with cached exc_text and no exc_info.
  • config_root_logger() success path (switching root handlers to JSON).
  • FastAPI: non-FastAPI app rejection, get_protocol fallback to the empty value, header lookup failure.
  • Quart: get_remote_user, header lookup, correlation id outside a request, request field getters.

Intentionally not covered: the ImportError fallbacks for frameworks that are not installed, the abstract-method bodies in framework_base.py, and the Connexion 2 / Starlette-request branches that need a different Connexion major version.

Also noted while running the suite locally: Sanic's test client logs Task was destroyed but it is pending at teardown of tests/test_sanic.py. It does not fail any test; worth checking if it is a teardown issue in the tests or in Sanic's test client.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions