当前位置: 首页>>代码示例>>Python>>正文


Python Calendar.events方法代码示例

本文整理汇总了Python中ics.icalendar.Calendar.events方法的典型用法代码示例。如果您正苦于以下问题:Python Calendar.events方法的具体用法?Python Calendar.events怎么用?Python Calendar.events使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ics.icalendar.Calendar的用法示例。


在下文中一共展示了Calendar.events方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_empty_list_to_eventlist

# 需要导入模块: from ics.icalendar import Calendar [as 别名]
# 或者: from ics.icalendar.Calendar import events [as 别名]
 def test_empty_list_to_eventlist(self):
     c = Calendar()
     l = []
     c.events = l
     self.assertIsNot(c.events, l)
     self.assertIsInstance(c.events, EventList)
     self.assertSequenceEqual(c.events, l)
开发者ID:glsonline,项目名称:ics.py,代码行数:9,代码来源:calendar.py

示例2: test_list_to_eventlist

# 需要导入模块: from ics.icalendar import Calendar [as 别名]
# 或者: from ics.icalendar.Calendar import events [as 别名]
 def test_list_to_eventlist(self):
     c = Calendar()
     l = [Event(), Event(), Event(name='plop')]
     c.events = l
     self.assertIsNot(c.events, l)
     self.assertIsInstance(c.events, EventList)
     self.assertSequenceEqual(c.events, l)
开发者ID:glsonline,项目名称:ics.py,代码行数:9,代码来源:calendar.py

示例3: test_events_setter

# 需要导入模块: from ics.icalendar import Calendar [as 别名]
# 或者: from ics.icalendar.Calendar import events [as 别名]
    def test_events_setter(self):

        c = Calendar(cal1)
        e = Event()
        c.events = [e]

        self.assertEqual(c.events, [e])
开发者ID:glsonline,项目名称:ics.py,代码行数:9,代码来源:calendar.py

示例4: test_events_eventlist

# 需要导入模块: from ics.icalendar import Calendar [as 别名]
# 或者: from ics.icalendar.Calendar import events [as 别名]
    def test_events_eventlist(self):

        c = Calendar()
        l = EventList()
        e = Event()
        l.append(e)
        c.events = l

        self.assertEqual(c.events, [e])
开发者ID:glsonline,项目名称:ics.py,代码行数:11,代码来源:calendar.py

示例5: test_eventlist_is_same

# 需要导入模块: from ics.icalendar import Calendar [as 别名]
# 或者: from ics.icalendar.Calendar import events [as 别名]
 def test_eventlist_is_same(self):
     c = Calendar()
     l = EventList()
     c.events = l
     self.assertIs(c.events, l)
开发者ID:glsonline,项目名称:ics.py,代码行数:7,代码来源:calendar.py

示例6: test_events_set_string

# 需要导入模块: from ics.icalendar import Calendar [as 别名]
# 或者: from ics.icalendar.Calendar import events [as 别名]
    def test_events_set_string(self):

        c = Calendar(cal1)
        e = "42"
        with self.assertRaises(ValueError):
            c.events = e
开发者ID:glsonline,项目名称:ics.py,代码行数:8,代码来源:calendar.py

示例7: test_events_set_int

# 需要导入模块: from ics.icalendar import Calendar [as 别名]
# 或者: from ics.icalendar.Calendar import events [as 别名]
    def test_events_set_int(self):

        c = Calendar()

        with self.assertRaises(ValueError):
            c.events = 42
开发者ID:glsonline,项目名称:ics.py,代码行数:8,代码来源:calendar.py


注:本文中的ics.icalendar.Calendar.events方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。