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

Fix compatibility with pytest 3.8.0 #312

Merged
merged 2 commits into from Sep 14, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 4 additions & 3 deletions osbrain/tests/test_agent_transport.py
Expand Up @@ -104,7 +104,7 @@ def test_agent_bind_given_address_tcp(nsproxy):


@skip_windows_ipc
def test_agent_ipc_from_different_folders(nsproxy):
def test_agent_ipc_from_different_folders(nsproxy, monkeypatch):
"""
IPC should work well even when agents are run from different folders.
"""
Expand All @@ -117,14 +117,14 @@ def on_init(self):
assert dira != dirb

# First agent run for directory `a`
os.chdir(dira)
monkeypatch.chdir(dira)
a = run_agent('a', base=Wdagent)
random_addr = a.bind('PULL', transport='ipc', handler=append_received)
set_addr = a.bind('PULL', addr='qwer', transport='ipc',
handler=append_received)

# Second agent run for directory `b`
os.chdir(dirb)
monkeypatch.chdir(dirb)
b = run_agent('b', base=Wdagent)
b.connect(random_addr, alias='random')
b.connect(set_addr, alias='set')
Expand All @@ -136,6 +136,7 @@ def on_init(self):
set_received = wait_agent_attr(a, data='bar', timeout=1)

# Clean directories
monkeypatch.undo()
rmtree(dira)
rmtree(dirb)

Expand Down