Esempio n. 1
0
def test_project_directory_properties(project_dir):
    project = Project()

    contracts_source_dir = get_contracts_source_dir(project_dir)
    assert is_same_path(project.contracts_source_dir, contracts_source_dir)

    build_asset_dir = get_build_asset_dir(project_dir)
    assert is_same_path(project.build_asset_dir, build_asset_dir)

    compiled_contracts_asset_path = get_compiled_contracts_asset_path(build_asset_dir)
    assert is_same_path(project.compiled_contracts_asset_path, compiled_contracts_asset_path)

    base_blockchain_storage_dir = get_base_blockchain_storage_dir(project_dir)
    assert is_same_path(project.base_blockchain_storage_dir, base_blockchain_storage_dir)
def test_project_directory_properties(project_dir):
    project = Project(project_dir)

    contracts_source_dirs = get_contracts_source_dirs(project_dir)
    for left, right in zip(project.contracts_source_dirs, contracts_source_dirs):
        assert is_same_path(left, right)

    build_asset_dir = get_build_asset_dir(project_dir)
    assert is_same_path(project.build_asset_dir, build_asset_dir)

    compiled_contracts_asset_path = get_compiled_contracts_asset_path(build_asset_dir)
    assert is_same_path(project.compiled_contracts_asset_path, compiled_contracts_asset_path)

    base_blockchain_storage_dir = get_base_blockchain_storage_dir(project_dir)
    assert is_same_path(project.base_blockchain_storage_dir, base_blockchain_storage_dir)
def test_project_directory_properties(project_dir):
    project = Project(project_dir, create_config_file=True)

    contracts_source_dirs = get_contracts_source_dirs(project_dir)
    for left, right in zip(project.contracts_source_dirs, contracts_source_dirs):
        assert is_same_path(left, right)

    build_asset_dir = get_build_asset_dir(project_dir)
    assert is_same_path(project.build_asset_dir, build_asset_dir)

    compiled_contracts_asset_path = get_compiled_contracts_asset_path(build_asset_dir)
    assert is_same_path(project.compiled_contracts_asset_path, compiled_contracts_asset_path)

    base_blockchain_storage_dir = get_base_blockchain_storage_dir(project_dir)
    assert is_same_path(project.base_blockchain_storage_dir, base_blockchain_storage_dir)
def test_project_directory_properties(project_dir):
    project = Project()

    contracts_source_dir = get_contracts_source_dir(project_dir)
    assert is_same_path(project.contracts_source_dir, contracts_source_dir)
    with pytest.warns(DeprecationWarning):
        assert is_same_path(project.contracts_dir, contracts_source_dir)

    build_asset_dir = get_build_asset_dir(project_dir)
    assert is_same_path(project.build_asset_dir, build_asset_dir)
    with pytest.warns(DeprecationWarning):
        assert is_same_path(project.build_dir, build_asset_dir)

    compiled_contracts_asset_path = get_compiled_contracts_asset_path(
        build_asset_dir)
    assert is_same_path(project.compiled_contracts_asset_path,
                        compiled_contracts_asset_path)
    with pytest.warns(DeprecationWarning):
        assert is_same_path(project.compiled_contracts_file_path,
                            compiled_contracts_asset_path)

    base_blockchain_storage_dir = get_base_blockchain_storage_dir(project_dir)
    assert is_same_path(project.base_blockchain_storage_dir,
                        base_blockchain_storage_dir)
    with pytest.warns(DeprecationWarning):
        assert is_same_path(project.blockchains_dir,
                            base_blockchain_storage_dir)

    data_dir = get_data_dir(project_dir, 'some-test-chain-name')
    with pytest.warns(DeprecationWarning):
        assert is_same_path(
            project.get_blockchain_data_dir('some-test-chain-name'), data_dir)

    chaindata_dir = get_chaindata_dir(data_dir)
    with pytest.warns(DeprecationWarning):
        assert is_same_path(
            project.get_blockchain_chaindata_dir('some-test-chain-name'),
            chaindata_dir)

    geth_ipc_path = get_geth_ipc_path(data_dir)
    with pytest.warns(DeprecationWarning):
        assert is_same_path(
            project.get_blockchain_ipc_path('some-test-chain-name'),
            geth_ipc_path)
def test_project_directory_properties(project_dir):
    project = Project(project_dir, create_config_file=True)

    if sys.version_info.major != 2:
        with pytest.warns(DeprecationWarning):
            project.contracts_source_dir

    contracts_source_dirs = get_contracts_source_dirs(project_dir)
    for left, right in zip(project.contracts_source_dirs,
                           contracts_source_dirs):
        assert is_same_path(left, right)

    build_asset_dir = get_build_asset_dir(project_dir)
    assert is_same_path(project.build_asset_dir, build_asset_dir)

    compiled_contracts_asset_path = get_compiled_contracts_asset_path(
        build_asset_dir)
    assert is_same_path(project.compiled_contracts_asset_path,
                        compiled_contracts_asset_path)

    base_blockchain_storage_dir = get_base_blockchain_storage_dir(project_dir)
    assert is_same_path(project.base_blockchain_storage_dir,
                        base_blockchain_storage_dir)
Esempio n. 6
0
 def compiled_contracts_asset_path(self):
     return get_compiled_contracts_asset_path(self.build_asset_dir)
Esempio n. 7
0
 def compiled_contracts_asset_path(self):
     return get_compiled_contracts_asset_path(self.build_asset_dir)