mirror of https://github.com/Textualize/rich.git
12 lines
376 B
Python
12 lines
376 B
Python
|
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
|