From 8b05e790aa5bdda7c5b0489ff35c62fbbffcd2b6 Mon Sep 17 00:00:00 2001 From: Will Willis Date: Mon, 6 May 2019 15:22:42 -0500 Subject: [PATCH 1/2] brushing back up on Python after doing these Koans during 2010 PyTX : ) --- python3/koans/about_asserts.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python3/koans/about_asserts.py b/python3/koans/about_asserts.py index d17ed0cdf..8aa7a830e 100644 --- a/python3/koans/about_asserts.py +++ b/python3/koans/about_asserts.py @@ -20,19 +20,19 @@ def test_assert_with_message(self): """ Enlightenment may be more easily achieved with appropriate messages. """ - self.assertTrue(False, "This should be True -- Please fix this") + self.assertTrue(True, "This should be True -- Please fix this") def test_fill_in_values(self): """ Sometimes we will ask you to fill in the values """ - self.assertEqual(__, 1 + 1) + self.assertEqual(2, 1 + 1) def test_assert_equality(self): """ To understand reality, we must compare our expectations against reality. """ - expected_value = __ + expected_value = 2 actual_value = 1 + 1 self.assertTrue(expected_value == actual_value) From 388c5ad80d93c754e1562cbf3142d2738a4b93ea Mon Sep 17 00:00:00 2001 From: Will Willis Date: Mon, 6 May 2019 15:37:14 -0500 Subject: [PATCH 2/2] Done with asserts --- python3/koans/about_asserts.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python3/koans/about_asserts.py b/python3/koans/about_asserts.py index 8aa7a830e..a85869529 100644 --- a/python3/koans/about_asserts.py +++ b/python3/koans/about_asserts.py @@ -14,7 +14,7 @@ def test_assert_truth(self): # # http://bit.ly/about_asserts - self.assertTrue(False) # This should be True + self.assertTrue(True) # This should be True def test_assert_with_message(self): """ @@ -40,7 +40,7 @@ def test_a_better_way_of_asserting_equality(self): """ Some ways of asserting equality are better than others. """ - expected_value = __ + expected_value = 2 actual_value = 1 + 1 self.assertEqual(expected_value, actual_value) @@ -51,7 +51,7 @@ def test_that_unittest_asserts_work_the_same_way_as_python_asserts(self): """ # This throws an AssertionError exception - assert False + assert True def test_that_sometimes_we_need_to_know_the_class_type(self): """ @@ -70,7 +70,7 @@ def test_that_sometimes_we_need_to_know_the_class_type(self): # # See for yourself: - self.assertEqual(__, "navel".__class__) # It's str, not + self.assertEqual(str, "navel".__class__) # It's str, not # Need an illustration? More reading can be found here: #