Skip to content

Commit 5000c9f

Browse files
lealreKludex
andauthored
tests: Add skipped coverages for websockets.py and templating.py using branch=true (#2793)
Co-authored-by: Marcelo Trylesinski <[email protected]>
1 parent f57b083 commit 5000c9f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

starlette/templating.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(
9898
self.context_processors = context_processors or []
9999
if directory is not None:
100100
self.env = self._create_env(directory, **env_options)
101-
elif env is not None:
101+
elif env is not None: # pragma: no branch
102102
self.env = env
103103

104104
self._setup_env_defaults(self.env)

starlette/websockets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ async def accept(
103103
) -> None:
104104
headers = headers or []
105105

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

0 commit comments

Comments
 (0)