Skip to content

Commit

Permalink
remove tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Dec 30, 2024
1 parent ca9fb7b commit b43e827
Showing 1 changed file with 0 additions and 34 deletions.
34 changes: 0 additions & 34 deletions tests/functional/codegen/features/iteration/test_for_range.py
Original file line number Diff line number Diff line change
Expand Up @@ -473,37 +473,3 @@ def foo() -> DynArray[int256, 10]:
return
with pytest.raises(StaticAssertionException):
get_contract(code)


def test_for_range_start_double_eval(get_contract, tx_failed):
code = """
@external
def foo() -> (uint256, DynArray[uint256, 3]):
x:DynArray[uint256, 3] = [3, 1]
res: DynArray[uint256, 3] = empty(DynArray[uint256, 3])
for i:uint256 in range(x.pop(),x.pop(), bound = 3):
res.append(i)
return len(x), res
"""
c = get_contract(code)
length, res = c.foo()

assert (length, res) == (0, [1, 2])


def test_for_range_stop_double_eval(get_contract, tx_failed):
code = """
@external
def foo() -> (uint256, DynArray[uint256, 3]):
x:DynArray[uint256, 3] = [3, 3]
res: DynArray[uint256, 3] = empty(DynArray[uint256, 3])
for i:uint256 in range(x.pop(), bound = 3):
res.append(i)
return len(x), res
"""
c = get_contract(code)
length, res = c.foo()

assert (length, res) == (1, [0, 1, 2])

0 comments on commit b43e827

Please sign in to comment.