Skip to content

Commit cc3e190

Browse files
authored
.
1 parent 6b02376 commit cc3e190

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pytest_django/fixtures.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
Dict,
1414
Generator,
1515
Iterable,
16+
Iterator,
1617
List,
1718
Literal,
1819
Optional,
@@ -701,7 +702,7 @@ def _assert_num_queries(
701702
conn = default_conn
702703

703704
with CaptureQueriesContext(conn) as context:
704-
yield from _assert_num_queries_context(
705+
yield _assert_num_queries_context(
705706
config=config, context=context, num=num, exact=exact, info=info
706707
)
707708

@@ -716,7 +717,7 @@ def _assert_num_queries_all_db(
716717
"""A recreation of pytest-django's assert_num_queries that works with all databases in settings.Databases."""
717718

718719
with CaptureAllConnectionsQueriesContext() as context:
719-
yield from _assert_num_queries_context(
720+
yield _assert_num_queries_context(
720721
config=config, context=context, num=num, exact=exact, info=info
721722
)
722723

@@ -728,7 +729,7 @@ def _assert_num_queries_context(
728729
num: int,
729730
exact: bool = True,
730731
info: str | None = None,
731-
) -> ContextManager[_QueriesContext]:
732+
) -> Iterator[_QueriesContext]:
732733
verbose = config.getoption("verbose") > 0
733734
with context:
734735
yield context

0 commit comments

Comments
 (0)