We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db7ad33 commit ad3eceaCopy full SHA for ad3ecea
tests/test_custom_signals.py
@@ -1,17 +1,23 @@
1
-import pytest
+"""
2
+Tests for custom signals.
3
4
+
5
import time
6
+import pytest
7
8
def test_clear_pending():
9
+ """
10
+ Regression test for https://github.com/sagemath/cysignals/pull/216
11
12
- from cysignals.alarm import alarm, AlarmInterrupt
-
13
+ alarm = pytest.importorskip("cysignals.alarm") # n/a on windows
14
cypari2 = pytest.importorskip("cypari2")
15
- with pytest.raises(AlarmInterrupt):
- alarm(0.5)
16
+ with pytest.raises(alarm.AlarmInterrupt):
17
+ alarm.alarm(0.01)
18
time.sleep(1)
19
20
try:
21
cypari2.Pari()
- except AlarmInterrupt:
22
+ except alarm.AlarmInterrupt:
23
pytest.fail("AlarmInterrupt was not cleared")
0 commit comments