Skip to content

Commit

Permalink
Include test for del
Browse files Browse the repository at this point in the history
  • Loading branch information
KrystalDelusion committed Apr 19, 2024
1 parent c2559b8 commit 7e3f473
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/task_loop/test_context_vars.py
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ async def on_task1():

def on_task2():
SomeContext.some_var["b"] = "d"
del SomeContext.some_var["a"]
order.append(SomeContext.some_var.as_dict())

tl.Task(on_run=on_task1)
Expand All @@ -292,7 +293,7 @@ def on_task2():

assert order == [
{"a": "b", "b": "c"},
{"a": "b", "b": "d"},
{"b": "d"},
{"a": "b", "b": "c"},
]

Expand Down

0 comments on commit 7e3f473

Please sign in to comment.