Skip to content

Commit ad3ecea

Browse files
tornariadimpase
authored andcommitted
skip new test on windows (needs cysignals.alarm)
1 parent db7ad33 commit ad3ecea

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

tests/test_custom_signals.py

+12-6
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,23 @@
1-
import pytest
1+
"""
2+
Tests for custom signals.
3+
"""
4+
25
import time
6+
import pytest
37

48
def test_clear_pending():
9+
"""
10+
Regression test for https://github.com/sagemath/cysignals/pull/216
11+
"""
512

6-
from cysignals.alarm import alarm, AlarmInterrupt
7-
13+
alarm = pytest.importorskip("cysignals.alarm") # n/a on windows
814
cypari2 = pytest.importorskip("cypari2")
915

10-
with pytest.raises(AlarmInterrupt):
11-
alarm(0.5)
16+
with pytest.raises(alarm.AlarmInterrupt):
17+
alarm.alarm(0.01)
1218
time.sleep(1)
1319

1420
try:
1521
cypari2.Pari()
16-
except AlarmInterrupt:
22+
except alarm.AlarmInterrupt:
1723
pytest.fail("AlarmInterrupt was not cleared")

0 commit comments

Comments
 (0)