コード例 #1
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_every_three_days_in_month():
    assert (pc("0 0 * 1 1,2,3") ==
            "At 00:00 on every Monday, Tuesday and Wednesday in January")
コード例 #2
0
 def test_invalid_unchanged(self):
     assert pc('* * * * * *') == '* * * * * *'
コード例 #3
0
 def test_one_day_in_month(self):
     assert pc("0 0 1 * *") == "At 00:00 on the 1st of every month"
コード例 #4
0
 def test_weekly(self):
     assert pc("0 0 * * 0") == "At 00:00 every Sunday"
コード例 #5
0
 def test_hourly(self):
     assert pc("0 * * * *") == "At 0 minutes past every hour of every day"
コード例 #6
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_day_7_is_sunday():
    assert pc("0 0 * * 7") == "At 00:00 every Sunday"
コード例 #7
0
 def test_one_day_in_month_2nd(self):
     assert pc("0 0 2 * *") == "At 00:00 on the 2nd of every month"
コード例 #8
0
def test_every_pair_of_days_in_month():
    assert (
        pc("0 0 * 1 1,2") ==
        "At 00:00 on every Monday and Tuesday in January"
    )
コード例 #9
0
def test_every_three_days_in_month():
    assert (
        pc("0 0 * 1 1,2,3") ==
        "At 00:00 on every Monday, Tuesday and Wednesday in January"
    )
コード例 #10
0
def test_one_day_in_month_11th():
    assert pc("0 0 11 * *") == "At 00:00 on the 11th of every month"
コード例 #11
0
def test_every_day_in_months():
    assert (
        pc("12 15 * 1,12 *") ==
        "At 15:12 every day in January and December"
    )
コード例 #12
0
def test_every_specific_day_in_months_and_more_and_weekly():
    assert (
        pc("0 0 1 1,2,3 1") ==
        "At 00:00 on the 1st of January, February and March and on every "
        "Monday in January, February and March"
    )
コード例 #13
0
def test_every_multiple_days_in_multiple_months_and_weekly():
    assert (
        pc("0 0 1,2,3,4 1,2 1") ==
        "At 00:00 on the 1st, 2nd, 3rd and 4th of January and February "
        "and on every Monday in January and February"
    )
コード例 #14
0
def test_every_pair_of_days_in_multiple_months_and_three_days_weekly():
    assert (
        pc("0 0 1,23 1,2 1,4,6") ==
        "At 00:00 on the 1st and 23rd of January and February and on "
        "every Monday, Thursday and Saturday in January and February"
    )
コード例 #15
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_every_specific_day_in_months_and_then_more():
    assert (pc("0 0 * 1,2,4,5 1") ==
            "At 00:00 on every Monday in January, February, April and May")
コード例 #16
0
def test_every_specific_day_in_months():
    assert (
        pc("0 0 * 1,2 1") ==
        "At 00:00 on every Monday in January and February"
    )
コード例 #17
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_yearly():
    assert pc("0 0 1 1 *") == "At 00:00 on the 1st of January"
コード例 #18
0
def test_every_specific_day_in_months_and_then_more():
    assert (
        pc("0 0 * 1,2,4,5 1") ==
        "At 00:00 on every Monday in January, February, April and May"
    )
コード例 #19
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_every_specific_day_in_months_and_weekly():
    assert (pc("0 0 1 1,2 1") ==
            "At 00:00 on the 1st of January and February and on every Monday "
            "in January and February")
コード例 #20
0
def test_every_multiple_days_in_multiple_months():
    assert (
        pc("0 0 * 1,2,4,5 1,2,3") ==
        "At 00:00 on every Monday, Tuesday and Wednesday "
        "in January, February, April and May"
    )
コード例 #21
0
 def test_every_day_in_month(self):
     assert pc("12 15 * 1 *") == "At 15:12 every day in January"
コード例 #22
0
def test_day_7_is_sunday():
    assert pc("0 0 * * 7") == "At 00:00 every Sunday"
コード例 #23
0
 def test_every_specific_day_in_month_and_weekly(self):
     assert (
         pc("0 0 1 1 1") ==
         "At 00:00 on the 1st of January and on every Monday in January"
     )
コード例 #24
0
def test_every_specific_day_in_months_and_weekly():
    assert (
        pc("0 0 1 1,2 1") ==
        "At 00:00 on the 1st of January and February and on every Monday "
        "in January and February"
    )
コード例 #25
0
 def test_continuous(self):
     assert pc("* * * * *") == "Every minute of every day"
コード例 #26
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_every_multiple_days_in_multiple_months_and_weekly():
    assert (pc("0 0 1,2,3,4 1,2 1") ==
            "At 00:00 on the 1st, 2nd, 3rd and 4th of January and February "
            "and on every Monday in January and February")
コード例 #27
0
 def test_nonsense_unchanged(self):
     assert pc('Lalalala') == 'Lalalala'
コード例 #28
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_every_specific_day_in_months_and_more_and_weekly():
    assert (pc("0 0 1 1,2,3 1") ==
            "At 00:00 on the 1st of January, February and March and on every "
            "Monday in January, February and March")
コード例 #29
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_every_pair_of_days_in_month():
    assert (
        pc("0 0 * 1 1,2") == "At 00:00 on every Monday and Tuesday in January")
コード例 #30
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_daily():
    assert pc("0 0 * * *") == "At 00:00 every day"
コード例 #31
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_every_specific_day_in_months():
    assert (pc("0 0 * 1,2 1") ==
            "At 00:00 on every Monday in January and February")
コード例 #32
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_hourly():
    assert pc("0 * * * *") == "At 0 minutes past every hour of every day"
コード例 #33
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_every_multiple_days_in_multiple_months():
    assert (pc("0 0 * 1,2,4,5 1,2,3") ==
            "At 00:00 on every Monday, Tuesday and Wednesday "
            "in January, February, April and May")
コード例 #34
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_minutely():
    assert (
        pc("* 5 * * *") == "Every minute between 05:00 and 05:59 every day")
コード例 #35
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_weekly():
    assert pc("0 0 * * 0") == "At 00:00 every Sunday"
コード例 #36
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_continuous():
    assert pc("* * * * *") == "Every minute of every day"
コード例 #37
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_monthly_and_weekly():
    assert (pc("0 0 1 * 1") ==
            "At 00:00 on the 1st of every month and every Monday")
コード例 #38
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_unsupported():
    assert pc("* */6 * * *") == "* */6 * * *"
コード例 #39
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_every_pair_of_days_in_multiple_months_and_twice_weekly():
    assert (pc("0 0 1,23 1,2 1,4") ==
            "At 00:00 on the 1st and 23rd of January and February and on "
            "every Monday and Thursday in January and February")
コード例 #40
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_one_day_in_month_2nd():
    assert pc("0 0 2 * *") == "At 00:00 on the 2nd of every month"
コード例 #41
0
 def test_one_day_in_month_21st(self):
     assert pc("0 0 21 * *") == "At 00:00 on the 21st of every month"
コード例 #42
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_invalid_unchanged():
    assert pc('* * * * * *') == '* * * * * *'
コード例 #43
0
 def test_every_specific_day_in_month(self):
     assert pc("0 0 * 1 1") == "At 00:00 on every Monday in January"
コード例 #44
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_nonsense_unchanged():
    assert pc('Lalalala') == 'Lalalala'
コード例 #45
0
 def test_monthly_and_weekly(self):
     assert (
         pc("0 0 1 * 1") ==
         "At 00:00 on the 1st of every month and every Monday"
     )
コード例 #46
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_one_day_in_month_11th():
    assert pc("0 0 11 * *") == "At 00:00 on the 11th of every month"
コード例 #47
0
 def test_daily(self):
     assert pc("0 0 * * *") == "At 00:00 every day"
コード例 #48
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_one_day_in_month_21st():
    assert pc("0 0 21 * *") == "At 00:00 on the 21st of every month"
コード例 #49
0
 def test_minutely(self):
     assert (
         pc("* 5 * * *") == "Every minute between 05:00 and 05:59 every day"
     )
コード例 #50
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_every_day_in_month():
    assert pc("12 15 * 1 *") == "At 15:12 every day in January"
コード例 #51
0
 def test_unsupported(self):
     assert pc("* */6 * * *") == "* */6 * * *"
コード例 #52
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_every_day_in_months():
    assert (
        pc("12 15 * 1,12 *") == "At 15:12 every day in January and December")
コード例 #53
0
 def test_yearly(self):
     assert pc("0 0 1 1 *") == "At 00:00 on the 1st of January"
コード例 #54
0
ファイル: test_prettify.py プロジェクト: qlixed/pretty-cron
def test_every_specific_day_in_month():
    assert pc("0 0 * 1 1") == "At 00:00 on every Monday in January"
コード例 #55
0
 def test_one_day_in_month(self):
     assert pc("0 0 1 * *") == "At 00:00 on the 1st of every month"
コード例 #56
0
 def test_every_specific_day_in_month_and_weekly(self):
     assert (
         pc("0 0 1 1 1") ==
         "At 00:00 on the 1st of January and on every Monday in January"
     )