Skip to content

Commit

Permalink
Added additional tests for invalid crontab notation
Browse files Browse the repository at this point in the history
  • Loading branch information
kalaspuff committed Aug 24, 2017
1 parent 3312b38 commit 72077aa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/test_crontab_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,3 +133,15 @@ def test_impossible_dates() -> None:

with pytest.raises(Exception):
get_next_datetime('* * 30 2 *', t)

with pytest.raises(Exception):
get_next_datetime('* * * * tue-mon', t)

with pytest.raises(Exception):
get_next_datetime('* * * x-dec *', t)

with pytest.raises(Exception):
get_next_datetime('* * * jan-y *', t)

with pytest.raises(Exception):
get_next_datetime('* * * nope *', t)

0 comments on commit 72077aa

Please sign in to comment.