Sha256: d2000ba232ead02ef31f19091e6d5e6b722352d63e22da343404fb705d663b2a

Contents?: true

Size: 551 Bytes

Versions: 107

Compression:

Stored size: 551 Bytes

Contents

import unittest

from leap import is_leap_year


class YearTest(unittest.TestCase):
    def test_leap_year(self):
        self.assertIs(is_leap_year(1996), True)

    def test_non_leap_year(self):
        self.assertIs(is_leap_year(1997), False)

    def test_non_leap_even_year(self):
        self.assertIs(is_leap_year(1998), False)

    def test_century(self):
        self.assertIs(is_leap_year(1900), False)

    def test_exceptional_century(self):
        self.assertIs(is_leap_year(2400), True)


if __name__ == '__main__':
    unittest.main()

Version data entries

107 entries across 107 versions & 1 rubygems

Version Path
trackler-2.0.8.12 tracks/python/exercises/leap/leap_test.py
trackler-2.0.8.11 tracks/python/exercises/leap/leap_test.py
trackler-2.0.8.10 tracks/python/exercises/leap/leap_test.py
trackler-2.0.8.9 tracks/python/exercises/leap/leap_test.py
trackler-2.0.8.8 tracks/python/exercises/leap/leap_test.py
trackler-2.0.8.7 tracks/python/exercises/leap/leap_test.py
trackler-2.0.8.6 tracks/python/exercises/leap/leap_test.py
trackler-2.0.8.5 tracks/python/exercises/leap/leap_test.py
trackler-2.0.8.4 tracks/python/exercises/leap/leap_test.py
trackler-2.0.8.3 tracks/python/exercises/leap/leap_test.py
trackler-2.0.8.2 tracks/python/exercises/leap/leap_test.py
trackler-2.0.8.1 tracks/python/exercises/leap/leap_test.py
trackler-2.0.7.0 tracks/python/exercises/leap/leap_test.py
trackler-2.0.6.44 tracks/python/exercises/leap/leap_test.py
trackler-2.0.6.43 tracks/python/exercises/leap/leap_test.py
trackler-2.0.6.42 tracks/python/exercises/leap/leap_test.py
trackler-2.0.6.41 tracks/python/exercises/leap/leap_test.py
trackler-2.0.6.40 tracks/python/exercises/leap/leap_test.py
trackler-2.0.6.39 tracks/python/exercises/leap/leap_test.py
trackler-2.0.6.38 tracks/python/exercises/leap/leap_test.py