summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2022-11-05 20:32:02 -0600
committerkotfu <kotfu@kotfu.net>2022-11-05 20:32:02 -0600
commitf2a7fcc9b96f595d2e17dcae28c62433ad89f423 (patch)
tree2528be3a0969bac84f5785e484264af7e6dbc23c
parenteff9274456528a96c4e492ce8499916e6594348a (diff)
downloadcmd2-git-f2a7fcc9b96f595d2e17dcae28c62433ad89f423.tar.gz
Add tests for to_bool() when passing boolean values
-rw-r--r--tests/test_utils.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_utils.py b/tests/test_utils.py
index cf2b9810..04ef13f6 100644
--- a/tests/test_utils.py
+++ b/tests/test_utils.py
@@ -843,6 +843,11 @@ def test_to_bool_str_invalid():
cu.to_bool('other')
+def test_to_bool_bool():
+ assert cu.to_bool(True)
+ assert not cu.to_bool(False)
+
+
def test_to_bool_int():
assert cu.to_bool(1)
assert cu.to_bool(-1)