本文整理汇总了Python中baklabel.Grandad类的典型用法代码示例。如果您正苦于以下问题:Python Grandad类的具体用法?Python Grandad怎么用?Python Grandad使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Grandad类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_monthend_beats_5th_sat
def test_monthend_beats_5th_sat(self):
""" 14 """
dday = date(2040, 3, 31)
expected = 'mar'
tsto = Grandad(dday, weekly_day=5)
result = tsto.label()
self.assertEqual(result, expected)
示例2: test_force_sat_weekly_day
def test_force_sat_weekly_day(self):
""" 13 """
dday = date(2040, 3, 24)
expected = 'sat_4'
tsto = Grandad(dday, weekly_day=5)
result = tsto.label()
self.assertEqual(result, expected)
示例3: test_2nd_friday
def test_2nd_friday(self):
""" 4 """
dday = date(2040, 3, 9)
expected = 'fri_2'
tsto = Grandad(dday)
result = tsto.label()
self.assertEqual(result, expected)
示例4: test_5th_friday
def test_5th_friday(self):
""" 1 """
dday = date(2040, 3, 30)
expected = 'fri_5'
tsto = Grandad(dday)
result = tsto.label()
self.assertEqual(result, expected)
示例5: test_default_eoy
def test_default_eoy(self):
""" 8 """
dday = date(2040, 12, 31)
expected = 'dec_2040'
tsto = Grandad(dday)
result = tsto.label()
self.assertEqual(result, expected)
示例6: test_monthend_mar
def test_monthend_mar(self):
""" 6 """
dday = date(2040, 3, 31)
expected = 'mar'
tsto = Grandad(dday)
result = tsto.label()
self.assertEqual(result, expected)
示例7: test_5th_friday_a
def test_5th_friday_a(self):
""" 25 """
dday = date(2040, 3, 30)
expected = 'a_fri_5'
tsto = Grandad(dday, server_name='a')
result = tsto.label()
self.assertEqual(result, expected)
示例8: test_monthend_feb
def test_monthend_feb(self):
""" 10 """
dday = date(2040, 2, 28)
expected = 'tue'
tsto = Grandad(dday)
result = tsto.label()
self.assertEqual(result, expected)
示例9: test_monthend_mar_a
def test_monthend_mar_a(self):
""" 30 """
dday = date(2040, 3, 31)
expected = 'a_mar'
tsto = Grandad(dday, server_name='a')
result = tsto.label()
self.assertEqual(result, expected)
示例10: test_3rd_friday_a
def test_3rd_friday_a(self):
""" 27 """
dday = date(2010, 3, 19)
expected = 'a_fri_3'
tsto = Grandad(dday, server_name='a')
result = tsto.label()
self.assertEqual(result, expected)
示例11: test_default_eoy_a
def test_default_eoy_a(self):
""" 32 """
dday = date(2040, 12, 31)
expected = 'a_dec_2040'
tsto = Grandad(dday, server_name='a')
result = tsto.label()
self.assertEqual(result, expected)
示例12: test_monthend_feb_leap_year_a
def test_monthend_feb_leap_year_a(self):
""" 33 """
dday = date(2040, 2, 29)
expected = 'a_feb'
tsto = Grandad(dday, server_name='a')
result = tsto.label()
self.assertEqual(result, expected)
示例13: test_monthend_feb_a
def test_monthend_feb_a(self):
""" 34 """
dday = date(2040, 2, 28)
expected = 'a_tue'
tsto = Grandad(dday, server_name='a')
result = tsto.label()
self.assertEqual(result, expected)
示例14: test_new_year_day_a
def test_new_year_day_a(self):
""" 35 """
dday = date(2040, 1, 1)
expected = 'a_sun'
tsto = Grandad(dday, server_name='a')
result = tsto.label()
self.assertEqual(result, expected)
示例15: test_force_no_weekly_day_mon
def test_force_no_weekly_day_mon(self):
""" 21 """
dday = date(2040, 3, 5)
expected = 'mon'
tsto = Grandad(dday, weekly_day=7)
result = tsto.label()
self.assertEqual(result, expected)