Skip to content

Commit

Permalink
use a real path instead of a fake path to fix test error in IPCProvider
Browse files Browse the repository at this point in the history
add a file name
  • Loading branch information
voith committed Oct 7, 2018
1 parent 448965a commit 1dc17e5
Showing 1 changed file with 10 additions and 2 deletions.
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() / 'jsonrpc.ipc'
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

0 comments on commit 1dc17e5

Please sign in to comment.