Skip to content

Commit

Permalink
remove Platform reference
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Oct 28, 2024
1 parent 3055ae7 commit 4bd67ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ipyparallel/tests/test_shellcmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

import pytest

from ipyparallel.cluster.shellcmd import Platform, ShellCommandSend
from ipyparallel.cluster.shellcmd import ShellCommandSend

windows_py_path = 'python'
linux_py_path = '/opt/conda/bin/python3'
Expand Down Expand Up @@ -125,7 +125,7 @@ def shellcmd_test_cmd():
def test_shellcmds(platform, sender, shellcmd_test_cmd, ssh_running):
def read_via_shell(shell, filename):
# small helper function to read a file via shell commands
if shell.platform == Platform.Windows:
if shell._win:
content = shell.check_output(f"type {filename}").strip()
else:
content = shell.check_output(f"cat {filename}").strip()
Expand All @@ -139,7 +139,7 @@ def print_file(shell, filename):
print(f"{idx:3}:{l}")

prefix = ""
if Platform.get() == Platform.Windows:
if sys.platform.startswith("win"):
if platform == "wsl":
pytest.skip("wsl deactivated") # comment to activate wsl tests
prefix = "/home/" + os.environ["USERNAME"] + "/"
Expand Down

0 comments on commit 4bd67ef

Please sign in to comment.