Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Mathieu <60658558+enitrat@users.noreply.github.com>
  • Loading branch information
obatirou and enitrat committed Aug 7, 2024
1 parent 4f0e73b commit ab9be1a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/src/kakarot/test_evm.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ def test_should_return_non_cached_valid_jumpdest(
# 1000000 is the default value for the init_evm test helper
@given(amount=integers(min_value=0, max_value=1000000))
def test_should_return_gas_left(self, cairo_run, amount):
output = cairo_run("test__charge_gas", amount=amount)
assert output[0] == 1000000 - amount # gas_left
assert output[1] == 0 # stopped
gas_left, stopped = cairo_run("test__charge_gas", amount=amount)
assert gas_left == 1000000 - amount
assert stopped == 0

# 1000000 is the default value for the init_evm test helper
@given(amount=integers(min_value=1000001, max_value=2**248 - 1))
def test_should_return_not_enough_gas(self, cairo_run, amount):
output = cairo_run("test__charge_gas", amount=amount)
assert output[0] == 0 # gas_left
assert output[1] == 1 # stopped
gas_left, stopped = cairo_run("test__charge_gas", amount=amount)
assert gas_left == 0
assert stopped == 1

0 comments on commit ab9be1a

Please sign in to comment.