mirror of
https://github.com/enzet/map-machine.git
synced 2025-08-03 08:40:11 +02:00
Add color test.
This commit is contained in:
parent
65ba89b254
commit
a899706923
1 changed files with 17 additions and 0 deletions
17
test/test_color.py
Normal file
17
test/test_color.py
Normal file
|
@ -0,0 +1,17 @@
|
|||
from colour import Color
|
||||
|
||||
from roentgen.color import is_bright
|
||||
|
||||
__author__: str = "Sergey Vartanov"
|
||||
__email__: str = "me@enzet.ru"
|
||||
|
||||
|
||||
def test_is_bright():
|
||||
"""
|
||||
Test detecting color brightness.
|
||||
"""
|
||||
assert is_bright(Color("white"))
|
||||
assert is_bright(Color("yellow"))
|
||||
assert not is_bright(Color("brown"))
|
||||
assert not is_bright(Color("black"))
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue