Skip to content

Commit

Permalink
Add regression test of ValueError with zero-step slices
Browse files Browse the repository at this point in the history
  • Loading branch information
nelfin committed Oct 20, 2022
1 parent 1a074cf commit 5caa47f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/unittest_inference.py
Expand Up @@ -5316,6 +5316,11 @@ def test_slice_inference_in_for_loops_not_working() -> None:
assert inferred == util.Uninferable


def test_slice_zero_step_does_not_raise_ValueError() -> None:
node = extract_node("[][::0]")
assert helpers.safe_infer(node) is None


def test_unpacking_starred_and_dicts_in_assignment() -> None:
node = extract_node(
"""
Expand Down

0 comments on commit 5caa47f

Please sign in to comment.