File tree Expand file tree Collapse file tree 2 files changed +5
-3
lines changed
Expand file tree Collapse file tree 2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change 11Trying to use absolute deadlines on a `trio.CancelScope ` constructed
22with a relative deadline now raises, after being deprecated since Trio
330.27.0.
4+
5+ To move over, replace the `trio.CancelScope ` object instead of mutating
6+ it.
Original file line number Diff line number Diff line change @@ -243,13 +243,12 @@ async def test_timeout_deadline_on_entry(mock_clock: _core.MockClock) -> None:
243243 assert rcs is cs
244244
245245
246- async def test_invalid_access_unentered (mock_clock : _core . MockClock ) -> None :
246+ async def test_invalid_access_unentered () -> None :
247247 cs = move_on_after (5 )
248- mock_clock .jump (3 )
249248
250249 match_str = "^Unentered relative cancel scope does not have an absolute deadline"
251250 with pytest .raises (RuntimeError , match = match_str ):
252- print ( "SHOULD NOT PRINT! deadline:" , cs .deadline )
251+ assert cs .deadline
253252
254253 with pytest .raises (RuntimeError , match = match_str ):
255254 cs .deadline = 7
You can’t perform that action at this time.
0 commit comments