Skip to content

Commit

Permalink
update existing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
charles-cooper committed Jan 9, 2025
1 parent bf6a75f commit fc31b21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/unitary/utils/test_cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,19 +47,19 @@ def test_cache_vvm():
assert mock_compile.call_count == 0

# First call should hit vvm.compile_source
test1 = _loads_partial_vvm(code, version, "fake_file.vy")
test1 = _loads_partial_vvm(code, version, None, "fake_file.vy")
assert mock_compile.call_count == 1

# Second call should hit the cache
test2 = _loads_partial_vvm(code, version, "fake_file.vy")
test2 = _loads_partial_vvm(code, version, None, "fake_file.vy")
assert mock_compile.call_count == 1

# using a different filename should also hit the cache
test3 = _loads_partial_vvm(code, version, "fake_fileeeee.vy")
test3 = _loads_partial_vvm(code, version, None, "fake_fileeeee.vy")
assert mock_compile.call_count == 1

# using a different vyper version should *miss* the cache
_loads_partial_vvm(code, version2, "fake_file.vy")
_loads_partial_vvm(code, version2, None, "fake_file.vy")
assert mock_compile.call_count == 2

assert test1.abi == test2.abi == test3.abi
Expand Down

0 comments on commit fc31b21

Please sign in to comment.