Skip to content

Commit 04347ed

Browse files
committed
add a test
1 parent 3bd5c1e commit 04347ed

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

tests/test_dependency_contextmanager.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from contextvars import ContextVar
21
import threading
2+
from contextvars import ContextVar
33
from typing import Dict
44

55
import pytest
@@ -85,7 +85,6 @@ async def context_b(state: dict = Depends(context_a)):
8585
state["context_b"] = f"finished b with a: {state['context_a']}"
8686

8787

88-
8988
ctx: ContextVar[str] = ContextVar("ctx")
9089

9190

@@ -155,7 +154,7 @@ async def bg(state: dict):
155154

156155

157156
@app.get("/check_cm_same_thread")
158-
async def check_cm_same_thread(_ = Depends(context_same_thread)):
157+
async def check_cm_same_thread(_=Depends(context_same_thread)):
159158
return None
160159

161160

0 commit comments

Comments
 (0)