Skip to content

Swap '2016' for '1996' to stop faulty logic from passing unit test in Leap #979

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions exercises/leap/leap_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
from leap import is_leap_year


# Tests adapted from `problem-specifications//canonical-data.json` @ v1.0.0
# 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(2016), True)
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)
Expand Down