本文整理汇总了Python中year.is_leap_year函数的典型用法代码示例。如果您正苦于以下问题:Python is_leap_year函数的具体用法?Python is_leap_year怎么用?Python is_leap_year使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了is_leap_year函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_non_leap_year
def test_non_leap_year(self):
self.assertIs(is_leap_year(1997), False)
示例2: test_exceptional_century
def test_exceptional_century(self):
self.assertIs(is_leap_year(2400), True)
示例3: test_leap_year
def test_leap_year(self):
self.assertIs(is_leap_year(1996), True)
示例4: test_leap_year
def test_leap_year(self):
self.assertTrue(is_leap_year(1996))
示例5: test_century
def test_century(self):
self.assertIs(is_leap_year(1900), False)
示例6: test_century
def test_century(self):
self.assertFalse(is_leap_year(1900))
示例7: test_non_leap_even_year
def test_non_leap_even_year(self):
self.assertFalse(is_leap_year(1998))
示例8: test_is_leap_year
def test_is_leap_year(self):
self.assertFalse(is_leap_year(2015))
示例9: test_is_leap_year
def test_is_leap_year(self):
self.assertIs(is_leap_year(2016), True)
self.assertFalse(is_leap_year(1994));
self.assertIs(is_leap_year(1492), False)
self.assertFalse(is_leap_year(1983));
示例10: test_leap_year
def test_leap_year(self):
self.assertTrue(is_leap_year(abcd))