def test_geth_installation_as_function_call(monkeypatch, tmpdir, platform, version):
if get_platform() != platform:
pytest.skip("Wront platform for install script")
base_install_path = str(tmpdir.mkdir("temporary-dir"))
monkeypatch.setenv('GETH_BASE_INSTALL_PATH', base_install_path)
# sanity check that it's not already installed.
executable_path = get_executable_path(version)
assert not os.path.exists(executable_path)
install_geth(identifier=version, platform=platform)
assert os.path.exists(executable_path)
monkeypatch.setenv('GETH_BINARY', executable_path)
actual_version = get_geth_version()
expected_version = semantic_version.Spec(version.lstrip('v'))
assert actual_version in expected_version
评论列表
文章目录