mirror of
https://github.com/BOSWatch/BW3-Core.git
synced 2026-04-05 06:15:31 +00:00
add doc strings for tests
This commit is contained in:
parent
c76c179225
commit
69acff24e4
5 changed files with 24 additions and 4 deletions
|
|
@ -58,27 +58,32 @@ def useTimerSlow():
|
|||
|
||||
|
||||
def test_timerStartStop(useTimerFast):
|
||||
"""!Try to start and stop a timer"""
|
||||
assert useTimerFast.start()
|
||||
assert useTimerFast.stop()
|
||||
|
||||
|
||||
def test_timerDoubleStart(useTimerFast):
|
||||
"""!Try to start a timer twice"""
|
||||
assert useTimerFast.start()
|
||||
assert useTimerFast.start()
|
||||
assert useTimerFast.stop()
|
||||
|
||||
|
||||
def test_timerStopNotStarted(useTimerFast):
|
||||
"""!Try to stop a timer where is not started"""
|
||||
assert useTimerFast.stop()
|
||||
|
||||
|
||||
def test_timerIsRunning(useTimerFast):
|
||||
"""!Check if a timer is running"""
|
||||
assert useTimerFast.start()
|
||||
assert useTimerFast.isRunning
|
||||
assert useTimerFast.stop()
|
||||
|
||||
|
||||
def test_timerRun(useTimerFast):
|
||||
"""!Run a timer and check overdue and lostEvents"""
|
||||
assert useTimerFast.start()
|
||||
time.sleep(0.2)
|
||||
assert useTimerFast.stop()
|
||||
|
|
@ -87,6 +92,7 @@ def test_timerRun(useTimerFast):
|
|||
|
||||
|
||||
def test_timerOverdue(useTimerSlow):
|
||||
"""!Run a timer and check overdue and lostEvents"""
|
||||
assert useTimerSlow.start()
|
||||
time.sleep(0.2)
|
||||
assert useTimerSlow.stop()
|
||||
|
|
@ -95,6 +101,7 @@ def test_timerOverdue(useTimerSlow):
|
|||
|
||||
|
||||
def test_timerOverdueLong(useTimerSlow):
|
||||
"""!Run a timer and check overdue and lostEvents"""
|
||||
assert useTimerSlow.start()
|
||||
time.sleep(1)
|
||||
assert useTimerSlow.stop()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue