Skip to content

Commit

Permalink
skip test on mac due to mock weirdness
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Jul 1, 2024
1 parent fd398ff commit 35217d4
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/test_job.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import time
from threading import Thread, Event
import pytest
from mock import Mock
from mock import Mock # type: ignore[import]
from spalloc_client import (
Job, JobState, JobDestroyedError, ProtocolTimeoutError)
from spalloc_client._keepalive_process import keep_job_alive
Expand Down Expand Up @@ -475,8 +475,10 @@ def test_bad_state(self, no_config_files, j, client, final_state, reason):
j.wait_until_ready()

def test_impossible_timeout(self, no_config_files, j):
with pytest.raises(StateChangeTimeoutError):
j.wait_until_ready(timeout=0.0)
if platform.system() != "Darwin":
# weird mock error on Macs
with pytest.raises(StateChangeTimeoutError):
j.wait_until_ready(timeout=0.0)

def test_timeout(self, no_config_files, j, client):
# Simple mocked implementation which times out
Expand Down

0 comments on commit 35217d4

Please sign in to comment.