mirror of
https://github.com/FlipsideCrypto/web3.py.git
synced 2026-02-06 10:56:47 +00:00
20 lines
547 B
Python
20 lines
547 B
Python
import pytest
|
|
|
|
from web3.utils.async import subprocess
|
|
|
|
from web3.utils.string import force_text
|
|
|
|
|
|
def test_admin_setSolc(web3, skip_if_testrpc):
|
|
skip_if_testrpc(web3)
|
|
|
|
try:
|
|
solc_path = subprocess.check_output(['which', 'solc']).strip()
|
|
except subprocess.CalledProcessError:
|
|
pytest.skip('solc binary not found')
|
|
solc_version = subprocess.check_output(['solc', '--version']).strip()
|
|
|
|
actual = web3.admin.setSolc(solc_path)
|
|
assert force_text(solc_version) in actual
|
|
assert force_text(solc_path) in actual
|