Skip to content

Commit

Permalink
add slicing test for augassign
Browse files Browse the repository at this point in the history
  • Loading branch information
smacke committed Dec 2, 2023
1 parent 49a346d commit 589b781
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/test/test_dynamic_slicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ def test_simple():
assert deps == {1, 2, 4}, "got %s" % deps


def test_simple_augassign():
run_cell("a = 0")
run_cell("a += 1")
run_cell("b = a")
run_cell("logging.info(a)")
deps = set(compute_unparsed_slice(4).keys())
assert deps == {1, 2, 4}, "got %s" % deps


def test_simple_function():
run_cell("a = 1")
run_cell("def f(): return a")
Expand Down

0 comments on commit 589b781

Please sign in to comment.