Skip to content

Commit ccf637d

Browse files
committed
Add deprecation test to get coverage up
1 parent aab5fe3 commit ccf637d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

trio/tests/test_ssl.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1244,3 +1244,15 @@ async def setup(**kwargs):
12441244
await aclose_forcefully(ssl_listener)
12451245
await aclose_forcefully(ssl_client)
12461246
await aclose_forcefully(ssl_server)
1247+
1248+
1249+
async def test_deprecated_max_refill_bytes():
1250+
stream1, stream2 = memory_stream_pair()
1251+
with pytest.warns(trio.TrioDeprecationWarning):
1252+
SSLStream(stream1, CLIENT_CTX, max_refill_bytes=100)
1253+
with pytest.warns(trio.TrioDeprecationWarning):
1254+
# passing None is wrong here, but I'm too lazy to make a fake Listener
1255+
# and we get away with it for now. And this test will be deleted in a
1256+
# release or two anyway, so hopefully we'll keep getting away with it
1257+
# for long enough.
1258+
SSLListener(None, CLIENT_CTX, max_refill_bytes=100)

0 commit comments

Comments
 (0)