Skip to content

Commit

Permalink
fix: remove limitation on installable solidity compilers for CI
Browse files Browse the repository at this point in the history
  • Loading branch information
skellet0r committed Oct 12, 2021
1 parent 44ab97f commit 891e06b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 22 deletions.
22 changes: 0 additions & 22 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from ethpm._utils.ipfs import dummy_ipfs_pin
from ethpm.backends.ipfs import BaseIPFSBackend
from prompt_toolkit.input.defaults import create_pipe_input
from semantic_version import Version

import brownie
from brownie._cli.console import Console
Expand Down Expand Up @@ -96,27 +95,6 @@ def pytest_generate_tests(metafunc):
metafunc.parametrize("evmtester", params, indirect=True)


# travis cannot call github ethereum/solidity API, so this method is patched
def pytest_sessionstart(session):
if not session.config.getoption("--evm"):
monkeypatch_session = MonkeyPatch()
monkeypatch_session.setattr(
"solcx.get_installable_solc_versions",
lambda: [
Version("0.6.7"),
Version("0.6.2"),
Version("0.6.0"),
Version("0.5.15"),
Version("0.5.8"),
Version("0.5.7"),
Version("0.5.0"),
Version("0.4.25"),
Version("0.4.24"),
Version("0.4.22"),
],
)


@pytest.fixture(scope="session")
def network_name():
return _dev_network
Expand Down
15 changes: 15 additions & 0 deletions tests/project/compiler/test_solidity.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ def msolc(monkeypatch):
]
monkeypatch.setattr("solcx.get_installed_solc_versions", lambda: installed)
monkeypatch.setattr("solcx.install_solc", lambda k, **z: installed.append(k))
monkeypatch.setattr(
"solcx.get_installable_solc_versions",
lambda: [
Version("0.6.7"),
Version("0.6.2"),
Version("0.6.0"),
Version("0.5.15"),
Version("0.5.8"),
Version("0.5.7"),
Version("0.5.0"),
Version("0.4.25"),
Version("0.4.24"),
Version("0.4.22"),
],
)
yield installed


Expand Down

0 comments on commit 891e06b

Please sign in to comment.