diff --git a/exercises/atbash-cipher/atbash_cipher_test.py b/exercises/atbash-cipher/atbash_cipher_test.py index c9dd09b141..b1c03673be 100644 --- a/exercises/atbash-cipher/atbash_cipher_test.py +++ b/exercises/atbash-cipher/atbash_cipher_test.py @@ -42,6 +42,18 @@ def test_decode_sentence(self): decode("zmlyh gzxov rhlug vmzhg vkkrm thglm v") ) + def test_decode_numbers(self): + self.assertMultiLineEqual( + "testing123testing", + decode("gvhgr mt123 gvhgr mt") + ) + + def test_encode_decode(self): + self.assertMultiLineEqual( + "testing123testing", + decode(encode("Testing, 1 2 3, testing.")) + ) + if __name__ == '__main__': unittest.main() diff --git a/exercises/leap/leap_test.py b/exercises/leap/leap_test.py index 152d88e12f..a7e9eb9ceb 100644 --- a/exercises/leap/leap_test.py +++ b/exercises/leap/leap_test.py @@ -5,19 +5,19 @@ class YearTest(unittest.TestCase): def test_leap_year(self): - self.assertIs(is_leap_year(1996), True) + self.assertTrue(is_leap_year(1996)) def test_non_leap_year(self): - self.assertIs(is_leap_year(1997), False) + self.assertFalse(is_leap_year(1997)) def test_non_leap_even_year(self): - self.assertIs(is_leap_year(1998), False) + self.assertFalse(is_leap_year(1998)) def test_century(self): - self.assertIs(is_leap_year(1900), False) + self.assertFalse(is_leap_year(1900)) def test_exceptional_century(self): - self.assertIs(is_leap_year(2400), True) + self.assertTrue(is_leap_year(2400)) if __name__ == '__main__':