Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,SU,MO,TH,FR,TU,SA;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,MO,TH,FR,TU,SA;BYSETPOS=1')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=-1SU')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=1,2,3,4,5,6,7')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=-1')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=3')
)
def test_check_understood_rrule():
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=1SU')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYMONTHDAY=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TU,TH;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,SU,MO,TH,FR,TU,SA;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,MO,TH,FR,TU,SA;BYSETPOS=1')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=-1SU')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=1,2,3,4,5,6,7')
)
def test_check_understood_rrule():
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=1SU')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYMONTHDAY=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TU,TH;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,SU,MO,TH,FR,TU,SA;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,MO,TH,FR,TU,SA;BYSETPOS=1')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=-1SU')
)
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYMONTHDAY=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TU,TH;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,SU,MO,TH,FR,TU,SA;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,MO,TH,FR,TU,SA;BYSETPOS=1')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=-1SU')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=1,2,3,4,5,6,7')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=-1')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=3')
)
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,SU,MO,TH,FR,TU,SA;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,MO,TH,FR,TU,SA;BYSETPOS=1')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=-1SU')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=1,2,3,4,5,6,7')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=-1')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=3')
)
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TU,TH;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=MO,TU,WE,TH,FR,SA,SU;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,SU,MO,TH,FR,TU,SA;BYSETPOS=1')
)
assert RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;INTERVAL=2;BYDAY=WE,MO,TH,FR,TU,SA;BYSETPOS=1')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=-1SU')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=1,2,3,4,5,6,7')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYMONTHDAY=-1')
)
assert not RecurrenceEditor.check_understood_rrule(
icalendar.vRecur.from_ical('FREQ=MONTHLY;BYDAY=TH;BYSETPOS=3')
)