本文整理汇总了Python中ics.icalendar.Calendar.creator方法的典型用法代码示例。如果您正苦于以下问题:Python Calendar.creator方法的具体用法?Python Calendar.creator怎么用?Python Calendar.creator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ics.icalendar.Calendar
的用法示例。
在下文中一共展示了Calendar.creator方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_creator
# 需要导入模块: from ics.icalendar import Calendar [as 别名]
# 或者: from ics.icalendar.Calendar import creator [as 别名]
def test_creator(self):
c0 = Calendar()
c1 = Calendar()
c0.creator = u'42'
with self.assertRaises(ValueError):
c1.creator = 42
self.assertEqual(c0.creator, u'42')
示例2: test_creator
# 需要导入模块: from ics.icalendar import Calendar [as 别名]
# 或者: from ics.icalendar.Calendar import creator [as 别名]
def test_creator(self):
c0 = Calendar()
c1 = Calendar()
c0.creator = u'42'
# TextProperties are cast to a string type
c1.creator = 42
self.assertEqual(c0.creator, u'42')
self.assertEqual(c1.creator, u'42')
示例3: test_existing_creator
# 需要导入模块: from ics.icalendar import Calendar [as 别名]
# 或者: from ics.icalendar.Calendar import creator [as 别名]
def test_existing_creator(self):
c = Calendar(cal1)
self.assertEqual(c.creator, u'-//Apple Inc.//Mac OS X 10.9//EN')
c.creator = u"apple_is_a_fruit"
self.assertEqual(c.creator, u"apple_is_a_fruit")