File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ async def test_local_task():
2727 del test_local .foo
2828 with pytest .raises (AttributeError ):
2929 test_local .foo
30+ # Delete again now that it's already gone
31+ with pytest .raises (AttributeError ):
32+ del test_local .foo
3033
3134
3235def test_local_thread ():
@@ -232,6 +235,9 @@ def sync_function():
232235 test_local .foo
233236 test_local .foo = "secret"
234237 assert test_local .foo == "secret"
238+ del test_local .foo
239+ with pytest .raises (AttributeError ):
240+ del test_local .foo
235241
236242 await sync_to_async (sync_function )()
237243 # Check the value outside is not touched
@@ -419,7 +425,7 @@ async def _test() -> None:
419425
420426@pytest .mark .asyncio
421427async def test_deletion () -> None :
422- """Check visibility with asyncio tasks."""
428+ """Check visibility of deletions with asyncio tasks."""
423429 test_local = Local ()
424430 test_local .value = 123
425431
You can’t perform that action at this time.
0 commit comments