Skip to content

Commit 0d677b2

Browse files
committed
more platform removal
1 parent 4bd67ef commit 0d677b2

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

ipyparallel/tests/test_shellcmd.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,10 @@
113113
@pytest.fixture
114114
def shellcmd_test_cmd():
115115
"""returns a command that runs for 5 seconds"""
116-
test_command = {}
117-
test_command["windows"] = 'ping -n 5 127.0.0.1'
118-
test_command["posix"] = (
119-
'ping -c 5 127.0.0.1' # ping needs to be installed to the standard ubuntu docker image
120-
)
121-
return test_command
116+
if sys.platform.startswith("win"):
117+
return 'ping -n 5 127.0.0.1'
118+
else:
119+
return 'ping -c 5 127.0.0.1'
122120

123121

124122
@pytest.mark.parametrize("platform, sender", senders, ids=sender_ids)
@@ -172,7 +170,7 @@ def print_file(shell, filename):
172170
info = sender.get_shell_info()
173171
assert len(info) == 2 and info[0] and info[1]
174172

175-
test_cmd = shellcmd_test_cmd[str(sender.platform.name.lower())]
173+
test_cmd = shellcmd_test_cmd
176174

177175
python_ok = sender.has_python()
178176
assert python_ok is True

0 commit comments

Comments
 (0)