diff --git a/ape_vyper/compiler/api.py b/ape_vyper/compiler/api.py index 1c7f689..4748347 100644 --- a/ape_vyper/compiler/api.py +++ b/ape_vyper/compiler/api.py @@ -523,11 +523,10 @@ def init_coverage_profile( def enrich_error(self, err: ContractLogicError) -> ContractLogicError: return enrich_error(err) + # TODO: In 0.9, make sure project is a kwarg here. def trace_source( self, contract_source: ContractSource, trace: TraceAPI, calldata: HexBytes ) -> SourceTraceback: - frames = [t for t in trace.get_raw_frames()] - assert len(frames) > 0, frames return SourceTracer.trace(trace.get_raw_frames(), contract_source, calldata) def _get_compiler_arguments( diff --git a/tests/conftest.py b/tests/conftest.py index 5476c2d..c13aa32 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,5 +1,4 @@ import os -import shutil from contextlib import contextmanager from pathlib import Path @@ -152,29 +151,29 @@ def compiler(compiler_manager): def project(config): project_source_dir = Path(__file__).parent - root_project = ape.Project(project_source_dir) - - # For increasing speed of debugging tests, allows not having - # to re-compile every time. - allow_cache = os.environ.get("APE_VYPER_TESTING_USE_CACHE", "0").lower() not in ( - False, - "f", - 0, - "0", - "false", - ) - - if allow_cache: - yield root_project - - else: - # NOTE: This is what CI/CD does. - # Delete build / .cache that may exist pre-copy - cache = project_source_dir / ".build" - shutil.rmtree(cache, ignore_errors=True) - - with root_project.isolate_in_tempdir() as tmp_project: - yield tmp_project + return ape.Project(project_source_dir) + # + # # For increasing speed of debugging tests, allows not having + # # to re-compile every time. + # allow_cache = os.environ.get("APE_VYPER_TESTING_USE_CACHE", "0").lower() not in ( + # False, + # "f", + # 0, + # "0", + # "false", + # ) + # + # if allow_cache: + # yield root_project + # + # else: + # # NOTE: This is what CI/CD does. + # # Delete build / .cache that may exist pre-copy + # cache = project_source_dir / ".build" + # shutil.rmtree(cache, ignore_errors=True) + # + # with root_project.isolate_in_tempdir() as tmp_project: + # yield tmp_project @pytest.fixture