Skip to content

Commit

Permalink
try removing more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tserg committed Oct 27, 2023
1 parent 9a6f5cd commit 97f4053
Showing 1 changed file with 12 additions and 14 deletions.
26 changes: 12 additions & 14 deletions tests/parser/functions/test_length.py
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
import pytest

# def test_test_length(get_contract_with_gas_estimation):
# test_length = """
# y: Bytes[10]

"""
def test_test_length(get_contract_with_gas_estimation):
test_length = """
y: Bytes[10]
# @external
# def foo(inp: Bytes[10]) -> uint256:
# x: Bytes[5] = slice(inp,1, 5)
# self.y = slice(inp, 2, 4)
# return len(inp) * 100 + len(x) * 10 + len(self.y)
# """

@external
def foo(inp: Bytes[10]) -> uint256:
x: Bytes[5] = slice(inp,1, 5)
self.y = slice(inp, 2, 4)
return len(inp) * 100 + len(x) * 10 + len(self.y)
"""
# c = get_contract_with_gas_estimation(test_length)
# assert c.foo(b"badminton") == 954, c.foo(b"badminton")
# print("Passed length test")

c = get_contract_with_gas_estimation(test_length)
assert c.foo(b"badminton") == 954, c.foo(b"badminton")
print("Passed length test")
"""

@pytest.mark.parametrize("typ", ["DynArray[uint256, 50]", "Bytes[50]", "String[50]"])
def test_zero_length(get_contract_with_gas_estimation, typ):
Expand Down

0 comments on commit 97f4053

Please sign in to comment.