Skip to content

Commit

Permalink
Fix coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Cito committed Sep 3, 2024
1 parent 9d903ba commit c41c2db
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/graphql/execution/map_async_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ async def athrow(
await self.aclose()
if value is None:
if traceback is None:
raise type_
raise type_ # pragma: no cover
value = (
type_
if isinstance(value, BaseException)
Expand Down
2 changes: 1 addition & 1 deletion src/graphql/pyutils/description.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def unregister(cls, base: type) -> None:
if not isinstance(base, type):
raise TypeError("Only types can be unregistered.")
if isinstance(cls.bases, tuple):
if base in cls.bases:
if base in cls.bases: # pragma: no branch
cls.bases = tuple(b for b in cls.bases if b is not base)
if not cls.bases:
cls.bases = object
Expand Down
6 changes: 1 addition & 5 deletions tests/execution/test_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -572,11 +572,7 @@ def handles_sync_errors_combined_with_async_ones():

async def async_resolver(_obj, _info):
nonlocal is_async_resolver_finished
sleep = asyncio.sleep
sleep(0)
sleep(0)
sleep(0)
is_async_resolver_finished = True
is_async_resolver_finished = True # pragma: no cover

schema = GraphQLSchema(
GraphQLObjectType(
Expand Down

0 comments on commit c41c2db

Please sign in to comment.