aboutsummaryrefslogtreecommitdiffstats
path: root/test_cal_notif.py
diff options
context:
space:
mode:
Diffstat (limited to 'test_cal_notif.py')
-rw-r--r--test_cal_notif.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/test_cal_notif.py b/test_cal_notif.py
index f22fbc3..0bb647c 100644
--- a/test_cal_notif.py
+++ b/test_cal_notif.py
@@ -193,6 +193,18 @@ def test_due():
assert cn.announce(o, t + 5 * M, cn.DEFAULTS["voice"]) == "Adesso: x"
+def test_choice():
+ assert cn.parse_choice("1d, 1h") == ["1d", "1h"]
+ assert cn.parse_choice("90m") == ["1h 30m"]
+ assert cn.parse_choice("none") == []
+ assert cn.parse_choice("reset") is None
+ try:
+ cn.parse_choice("soon")
+ raise AssertionError
+ except ValueError:
+ pass
+
+
if __name__ == "__main__":
for name, fn in list(globals().items()):
if name.startswith("test_"):