Beispiel #1
0
def test_ethpm_already_installed():
    path = _get_data_folder().joinpath("packages/zeppelin.snakecharmers.eth")
    path.mkdir()
    path.joinpath("[email protected]").mkdir()

    with pytest.raises(FileExistsError):
        install_package("ethpm://zeppelin.snakecharmers.eth:1/[email protected]")
Beispiel #2
0
def test_github_already_installed():
    path = _get_data_folder().joinpath("packages/brownie-mix")
    path.mkdir()
    path.joinpath("[email protected]").mkdir()

    with pytest.raises(FileExistsError):
        install_package("brownie-mix/[email protected]")
Beispiel #3
0
def test_dependency_already_installed(dependentproject):
    install_package("brownie-mix/[email protected]")
    dependentproject.load()
Beispiel #4
0
def test_valid_repo_not_a_project():
    with pytest.raises(InvalidPackage):
        install_package("iamdefinitelyahuman/[email protected]")

    assert not _get_data_folder().joinpath("packages/iamdefinitelyahuman/[email protected]").exists()
Beispiel #5
0
def test_bad_project_id_repo_org():
    with pytest.raises(ValueError):
        install_package("[email protected]")
Beispiel #6
0
def test_bad_project_id_version():
    with pytest.raises(ValueError):
        install_package("brownie-mix/token-mix")
Beispiel #7
0
def test_unknown_version():
    with pytest.raises(ValueError):
        install_package("brownie-mix/[email protected]")
Beispiel #8
0
def test_install_from_ethpm(ipfs_mock):
    install_package("ethpm://zeppelin.snakecharmers.eth:1/[email protected]")
Beispiel #9
0
def test_install_from_github():
    install_package("brownie-mix/[email protected]")
Beispiel #10
0
def test_wont_compile():
    # can't compile due to a NamespaceCollision, should still install
    install_package("makerdao/[email protected]")
Beispiel #11
0
def test_import_from_package():
    install_package("brownie-mix/[email protected]")
    compile_source(code)
Beispiel #12
0
def test_pm_fixture(plugintester):
    install_package("brownie-mix/[email protected]")
    result = plugintester.runpytest()
    result.assert_outcomes(passed=1)
def test_popular_packages(package_test, package_id):
    install_package(package_id)