Sha256: 566d97b082f0385c9d6e7fd92330954d67018ad02a53a6849893847463bfc842

Contents?: true

Size: 617 Bytes

Versions: 54

Compression:

Stored size: 617 Bytes

Contents

import unittest

from leap import is_leap_year


# Tests adapted from `problem-specifications//canonical-data.json` @ v1.3.0

class YearTest(unittest.TestCase):
    def test_year_not_divisible_by_4(self):
        self.assertIs(is_leap_year(2015), False)

    def test_year_divisible_by_4_not_divisible_by_100(self):
        self.assertIs(is_leap_year(1996), True)

    def test_year_divisible_by_100_not_divisible_by_400(self):
        self.assertIs(is_leap_year(2100), False)

    def test_year_divisible_by_400(self):
        self.assertIs(is_leap_year(2000), True)


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

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
trackler-2.2.1.140 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.139 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.138 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.137 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.136 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.135 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.134 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.133 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.132 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.131 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.130 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.129 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.128 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.127 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.126 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.125 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.124 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.123 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.122 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.121 tracks/python/exercises/leap/leap_test.py