Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use a real path instead of a fake path to fix test error in IPCProvider #480

Merged
merged 1 commit into from
Oct 8, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions tests/config-objects/test_web3_config_object.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
from pathlib import (
Path
)
from tempfile import (
gettempdir,
)

import pytest

from web3.providers.ipc import (
Expand All @@ -23,16 +30,17 @@ def test_provider_property_without_settings():


def test_provider_property_with_settings():
tmp_path = Path(gettempdir()).resolve()
web3_config = Web3Config({
'provider': {
'class': 'web3.providers.ipc.IPCProvider',
'settings': {
'ipc_path': '/not/a/real-path'
'ipc_path': tmp_path
},
},
})
assert isinstance(web3_config.provider, IPCProvider)
assert web3_config.provider.ipc_path == '/not/a/real-path'
assert web3_config.provider.ipc_path == str(tmp_path)


@pytest.mark.parametrize(
Expand Down