Skip to content

Commit

Permalink
100% core funcitionality test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
lnqs committed Feb 23, 2022
1 parent 6b37f45 commit e350af8
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tests/test_wakelock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from asyncio import Event

from knoepfe.wakelock import WakeLock


def test_wake_lock() -> None:
event = Event()
wake_lock = WakeLock(event)

wake_lock.acquire()
assert event.is_set()
assert wake_lock.held()

wake_lock.release()
assert not wake_lock.held()

0 comments on commit e350af8

Please sign in to comment.