rich/tests/test_pick.py

12 lines
376 B
Python
Raw Normal View History

2020-06-07 09:05:26 +00:00
from rich._pick import pick_bool
def test_pick_bool():
assert pick_bool(False, True) == False
assert pick_bool(None, True) == True
assert pick_bool(True, None) == True
assert pick_bool(False, None) == False
assert pick_bool(None, None) == False
assert pick_bool(None, None, False, True) == False
assert pick_bool(None, None, True, False) == True