Sha256: 56d314afb8bdd8ba79900eb703611d090117283979e3024c72a18aeca60826bb

Contents?: true

Size: 617 Bytes

Versions: 53

Compression:

Stored size: 617 Bytes

Contents

import unittest

from leap import is_leap_year


# Tests adapted from `problem-specifications//canonical-data.json` @ v1.2.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

53 entries across 53 versions & 1 rubygems

Version Path
trackler-2.2.1.105 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.104 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.103 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.102 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.101 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.100 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.99 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.98 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.97 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.96 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.95 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.94 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.93 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.92 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.91 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.90 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.89 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.88 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.87 tracks/python/exercises/leap/leap_test.py
trackler-2.2.1.86 tracks/python/exercises/leap/leap_test.py