Skip to content

Warn on query-intensive tests #752

@lukasjuhrich

Description

@lukasjuhrich

In this snippet, I've outlined a query plugin for pytest which gives a warning for tests which use more than 10 queries (threshold is configurable using pytest.mark.max_queries(N).

image

This would give us the ability to proactively guard against N+1 queries and implement appropriate prefetching.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions