Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
967cad74
Commit
967cad74
authored
Apr 13, 2017
by
Damien George
Browse files
tests/extmod/utimeq1: Improve coverage of utimeq module.
parent
c7e8c6f7
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/extmod/utimeq1.py
View file @
967cad74
...
...
@@ -34,6 +34,41 @@ try:
except
IndexError
:
pass
# unsupported unary op
try
:
~
h
assert
False
except
TypeError
:
pass
# pushing on full queue
h
=
utimeq
(
1
)
h
.
push
(
1
,
0
,
0
)
try
:
h
.
push
(
2
,
0
,
0
)
assert
False
except
IndexError
:
pass
# popping into invalid type
try
:
h
.
pop
([])
assert
False
except
TypeError
:
pass
# length
assert
len
(
h
)
==
1
# peektime
assert
h
.
peektime
()
==
1
# peektime with empty queue
try
:
utimeq
(
1
).
peektime
()
assert
False
except
IndexError
:
pass
def
pop_all
(
h
):
l
=
[]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment