Skip to content

Commit 388c5ad

Browse files
author
Will Willis
committed
Done with asserts
1 parent 8b05e79 commit 388c5ad

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

python3/koans/about_asserts.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def test_assert_truth(self):
1414
#
1515
# http://bit.ly/about_asserts
1616

17-
self.assertTrue(False) # This should be True
17+
self.assertTrue(True) # This should be True
1818

1919
def test_assert_with_message(self):
2020
"""
@@ -40,7 +40,7 @@ def test_a_better_way_of_asserting_equality(self):
4040
"""
4141
Some ways of asserting equality are better than others.
4242
"""
43-
expected_value = __
43+
expected_value = 2
4444
actual_value = 1 + 1
4545

4646
self.assertEqual(expected_value, actual_value)
@@ -51,7 +51,7 @@ def test_that_unittest_asserts_work_the_same_way_as_python_asserts(self):
5151
"""
5252

5353
# This throws an AssertionError exception
54-
assert False
54+
assert True
5555

5656
def test_that_sometimes_we_need_to_know_the_class_type(self):
5757
"""
@@ -70,7 +70,7 @@ def test_that_sometimes_we_need_to_know_the_class_type(self):
7070
#
7171
# See for yourself:
7272

73-
self.assertEqual(__, "navel".__class__) # It's str, not <type 'str'>
73+
self.assertEqual(str, "navel".__class__) # It's str, not <type 'str'>
7474

7575
# Need an illustration? More reading can be found here:
7676
#

0 commit comments

Comments
 (0)