Skip to main content
Glama

Model Coupling Platform Server

by EstebanIIT
test_capabilities_slurm.py1.58 kB
import pytest from src.capabilities.slurm_handler import submit_slurm_job #=============================================================================# #Tool: slurm #=============================================================================# @pytest.mark.asyncio async def test_submit_slurm_job_success(): """Test successful Slurm job submission""" result = await submit_slurm_job("/path/to/script.sh", 4) assert "job_id" in result assert "status" in result assert "details" in result assert 100000 <= result["job_id"] <= 999999 assert result["status"] == "PENDING" assert result["details"]["cores"] == 4 @pytest.mark.asyncio async def test_submit_slurm_job_default_cores(): """Test submission with default core count""" result = await submit_slurm_job("/path/to/script.sh") assert result["details"]["cores"] == 1 # Default value @pytest.mark.asyncio async def test_slurm_invalid_cores_low(): """Test invalid core count (too low)""" with pytest.raises(ValueError, match="Cores must be between 1 and 32"): await submit_slurm_job("/path/to/script.sh", 0) @pytest.mark.asyncio async def test_slurm_invalid_cores_high(): """Test invalid core count (too high)""" with pytest.raises(ValueError, match="Cores must be between 1 and 32"): await submit_slurm_job("/path/to/script.sh", 33) @pytest.mark.asyncio async def test_slurm_missing_script_path(): """Test missing required script path""" with pytest.raises(ValueError, match="Script path is required"): await submit_slurm_job("")

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/EstebanIIT/CS550_MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server