use switch_global_version

pull/1799/head
alpharush 2 years ago
parent 07a67b5a13
commit 38ac822bc5
  1. 3
      .github/workflows/test.yml
  2. 10
      tests/unit/slithir/test_ssa_generation.py

@ -56,8 +56,7 @@ jobs:
- name: unit / core, slithir, utils
run: |
# TODO add back once solc-select issues figured out
pytest --cov=slither --cov-append tests/unit/core
pytest --cov=slither --cov-append tests/unit/
python -m coverage report
- name: tools / slither-read-storage

@ -247,17 +247,9 @@ def select_solc_version(version: Optional[str]) -> None:
)
ver = list(vers)[-1]
version = ".".join(map(str, ver))
solc_select.install_artifacts([version])
env = dict(os.environ)
env_restore = dict(env)
env["SOLC_VERSION"] = version
os.environ.clear()
os.environ.update(env)
solc_select.switch_global_version(version, always_install=True)
yield version
os.environ.clear()
os.environ.update(env_restore)
@contextmanager

Loading…
Cancel
Save