Skip to content

Commit

Permalink
fix: cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Aug 29, 2024
1 parent 6d05c26 commit 30ffb64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ape_vyper/compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,9 @@ def compile_code(
# Not sure when this would happen.
raise VyperCompileError("Failed to produce contract type.")

# Clean-up (just in case)
file.unlink(missing_ok=True)

return contract_type

def _source_vyper_version(self, code: str) -> Version:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ def test_enrich_error_handle_when_name(compiler, geth_provider, mocker):

tb = mocker.MagicMock()
tb.revert_type = "NONPAYABLE_CHECK"
error = ContractLogicError("", source_traceback=tb)
error = ContractLogicError(None, source_traceback=tb)
new_error = compiler.enrich_error(error)
assert isinstance(new_error, NonPayableError)

Expand Down

0 comments on commit 30ffb64

Please sign in to comment.