Skip to content

Commit

Permalink
tests: Add skipped coverages for websockets.py and templating.py
Browse files Browse the repository at this point in the history
…using `branch=true` (#2793)

Co-authored-by: Marcelo Trylesinski <marcelotryle@gmail.com>
  • Loading branch information
lealre and Kludex authored Dec 13, 2024
1 parent f57b083 commit 5000c9f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion starlette/templating.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ def __init__(
self.context_processors = context_processors or []
if directory is not None:
self.env = self._create_env(directory, **env_options)
elif env is not None:
elif env is not None: # pragma: no branch
self.env = env

self._setup_env_defaults(self.env)
Expand Down
2 changes: 1 addition & 1 deletion starlette/websockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ async def accept(
) -> None:
headers = headers or []

if self.client_state == WebSocketState.CONNECTING:
if self.client_state == WebSocketState.CONNECTING: # pragma: no branch
# If we haven't yet seen the 'connect' message, then wait for it first.
await self.receive()
await self.send({"type": "websocket.accept", "subprotocol": subprotocol, "headers": headers})
Expand Down

0 comments on commit 5000c9f

Please sign in to comment.