Sha256: 508cb1d6dd981d907ecba8bc2c3f94c1c397c4efa4d82f06df0af6d7296656e1

Contents?: true

Size: 600 Bytes

Versions: 130

Compression:

Stored size: 600 Bytes

Contents

import unittest

from leap import is_leap_year


# test cases adapted from `x-common//canonical-data.json` @ version: 1.0.0

class YearTest(unittest.TestCase):
    def test_year_not_divisible_by_4(self):
        self.assertFalse(is_leap_year(2015))

    def test_year_divisible_by_4_not_divisible_by_100(self):
        self.assertTrue(is_leap_year(2016))

    def test_year_divisible_by_100_not_divisible_by_400(self):
        self.assertFalse(is_leap_year(2100))

    def test_year_divisible_by_400(self):
        self.assertTrue(is_leap_year(2000))


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

Version data entries

130 entries across 130 versions & 1 rubygems

Version Path
trackler-2.2.1.45 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.44 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.43 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.42 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.41 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.40 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.39 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.38 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.37 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.36 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.35 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.34 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.33 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.32 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.31 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.30 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.29 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.28 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.27 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.26 tracks/python/exercises/leap/leap_test.py