1 parent c7e8c6f commit 967cad7Copy full SHA for 967cad7
1 file changed
tests/extmod/utimeq1.py
@@ -34,6 +34,41 @@ def dprint(*v):
34
except IndexError:
35
pass
36
37
+# unsupported unary op
38
+try:
39
+ ~h
40
+ assert False
41
+except TypeError:
42
+ pass
43
+
44
+# pushing on full queue
45
+h = utimeq(1)
46
+h.push(1, 0, 0)
47
48
+ h.push(2, 0, 0)
49
50
+except IndexError:
51
52
53
+# popping into invalid type
54
55
+ h.pop([])
56
57
58
59
60
+# length
61
+assert len(h) == 1
62
63
+# peektime
64
+assert h.peektime() == 1
65
66
+# peektime with empty queue
67
68
+ utimeq(1).peektime()
69
70
71
72
73
def pop_all(h):
74
l = []
0 commit comments