Test that a background task cannot be chained.
()
| 1924 | |
| 1925 | @pytest.mark.asyncio |
| 1926 | async def test_background_task_no_chain(): |
| 1927 | """Test that a background task cannot be chained.""" |
| 1928 | bts = BackgroundTaskState() |
| 1929 | with pytest.raises(RuntimeError): |
| 1930 | await bts.bad_chain1() |
| 1931 | with pytest.raises(RuntimeError): |
| 1932 | await bts.bad_chain2() |
| 1933 | |
| 1934 | |
| 1935 | def test_mutable_list(mutable_state): |
nothing calls this directly
no test coverage detected