Skip to content

Commit

Permalink
Skip making a Connection (hopefully fixes hang)
Browse files Browse the repository at this point in the history
Signed-off-by: Fabrice Normandin <[email protected]>
  • Loading branch information
lebrice committed Nov 30, 2023
1 parent 1cc6064 commit 06264d9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/cli/test_slurm_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
import os

import pytest
from fabric.connection import Connection

from milatools.cli.remote import Remote, SlurmRemote

# from fabric.connection import Connection

SLURM_CLUSTER = os.environ.get("SLURM_CLUSTER", "mila")

CONN_TO_SLURM_CLUSTER_AVAILABLE = False
try:
connection = Connection(SLURM_CLUSTER)
# connection = Connection(SLURM_CLUSTER)
# CONN_TO_SLURM_CLUSTER_AVAILABLE = connection.run("which srun").stdout != ""
CONN_TO_SLURM_CLUSTER_AVAILABLE = True
except Exception:
CONN_TO_SLURM_CLUSTER_AVAILABLE = False
pass

requires_access_to_slurm_cluster = pytest.mark.skipif(
not CONN_TO_SLURM_CLUSTER_AVAILABLE,
Expand Down

0 comments on commit 06264d9

Please sign in to comment.