Skip to content

Commit

Permalink
test: debug this
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed Sep 28, 2024
1 parent 5dfe1a5 commit 228b357
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 31 deletions.
4 changes: 2 additions & 2 deletions tests/ape-config.yaml → ape-config.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Allows compiling to work from the project-level.
contracts_folder: contracts/passing_contracts
contracts_folder: tests/contracts/passing_contracts

# Specify a dependency to use in Vyper imports.
dependencies:
- name: exampledependency
local: ./ExampleDependency
local: ./tests/ExampleDependency

# NOTE: Snekmate does not need to be listed here since
# it is installed in site-packages. However, we include it
Expand Down
28 changes: 1 addition & 27 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,33 +135,7 @@ def compiler(compiler_manager):

@pytest.fixture(scope="session", autouse=True)
def project(config):
project_source_dir = Path(__file__).parent
os.chdir(project_source_dir)
project = ape.Project(project_source_dir)
config.local_project = project
return project
#
# # 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 config.local_project


@pytest.fixture
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Show we can import from the root of the project w/o needing relative imports
from contracts.passing_contracts import zero_four_module as zero_four_module
from tests.contracts.passing_contracts import zero_four_module as zero_four_module

@external
def callModuleFunctionFromSubdir(role: bytes32) -> bool:
Expand Down
2 changes: 1 addition & 1 deletion tests/contracts/passing_contracts/use_iface.vy
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import exampledependency.Dependency as Dep
from .interfaces import IFace2 as IFace2

# Also use IFaceNested to show we can use nested interfaces.
from contracts.passing_contracts.interfaces.nested import IFaceNested as IFaceNested
from tests.contracts.passing_contracts.interfaces.nested import IFaceNested as IFaceNested


@external
Expand Down

0 comments on commit 228b357

Please sign in to comment.