Skip to content

Commit

Permalink
Test for the new deprecation warning
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Nov 4, 2023
1 parent 06d13bc commit b77b116
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_to_thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,11 @@ def wait_event() -> None:
assert future.result(1)


async def test_deprecated_cancellable_param() -> None:
with pytest.warns(DeprecationWarning, match="The `cancellable=`"):
await to_thread.run_sync(bool, cancellable=True)


async def test_contextvar_propagation() -> None:
var = ContextVar("var", default=1)
var.set(6)
Expand Down

0 comments on commit b77b116

Please sign in to comment.