Sha256: d8c7e300024589c87232e16530747d18547e618021ee2a3b85739d97d61d4e54

Contents?: true

Size: 550 Bytes

Versions: 26

Compression:

Stored size: 550 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

26 entries across 26 versions & 1 rubygems

Version Path
trackler-2.0.3.0 tracks/python/exercises/leap/leap_test.py
trackler-2.0.2.0 tracks/python/exercises/leap/leap_test.py
trackler-2.0.1.2 tracks/python/exercises/leap/leap_test.py
trackler-2.0.1.1 tracks/python/exercises/leap/leap_test.py
trackler-2.0.1.0 tracks/python/exercises/leap/leap_test.py
trackler-2.0.0.10 tracks/python/exercises/leap/leap_test.py
trackler-2.0.0.9 tracks/python/exercises/leap/leap_test.py
trackler-2.0.0.8 tracks/python/exercises/leap/leap_test.py
trackler-2.0.0.7 tracks/python/exercises/leap/leap_test.py
trackler-2.0.0.6 tracks/python/exercises/leap/leap_test.py
trackler-2.0.0.5 tracks/python/exercises/leap/leap_test.py
trackler-2.0.0.4 tracks/python/exercises/leap/leap_test.py
trackler-2.0.0.3 tracks/python/exercises/leap/leap_test.py
trackler-2.0.0.2 tracks/python/exercises/leap/leap_test.py
trackler-2.0.0.1 tracks/python/exercises/leap/leap_test.py
trackler-2.0.0.0 tracks/python/exercises/leap/leap_test.py
trackler-1.0.4.1 tracks/python/exercises/leap/leap_test.py
trackler-1.0.4.0 tracks/python/exercises/leap/leap_test.py
trackler-1.0.3.0 tracks/python/exercises/leap/leap_test.py
trackler-1.0.2.1 tracks/python/exercises/leap/leap_test.py