Skip to content

Commit 4407460

Browse files
committed
day2
1 parent 5ec3ff2 commit 4407460

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

python2/koans/about_asserts.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_a_better_way_of_asserting_equality(self):
4242
"""
4343
Some ways of asserting equality are better than others.
4444
"""
45-
expected_value = __
45+
expected_value = 2
4646
actual_value = 1 + 1
4747

4848
self.assertEqual(expected_value, actual_value)
@@ -53,7 +53,7 @@ def test_that_unittest_asserts_work_the_same_way_as_python_asserts(self):
5353
"""
5454

5555
# This throws an AssertionError exception
56-
assert False
56+
assert True
5757

5858
def test_that_sometimes_we_need_to_know_the_class_type(self):
5959
"""
@@ -72,7 +72,7 @@ def test_that_sometimes_we_need_to_know_the_class_type(self):
7272
#
7373
# See for yourself:
7474

75-
self.assertEqual(__, "naval".__class__) # It's str, not <type 'str'>
75+
self.assertEqual(str, "naval".__class__) # It's str, not <type 'str'>
7676

7777
# Need an illustration? More reading can be found here:
7878
#

python2/koans/about_strings.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ class AboutStrings(Koan):
88

99
def test_double_quoted_strings_are_strings(self):
1010
string = "Hello, world."
11-
self.assertEqual(__, isinstance(string, basestring))
11+
self.assertEqual(True, isinstance(string, basestring))
1212

1313
def test_single_quoted_strings_are_also_strings(self):
1414
string = 'Goodbye, world.'
15-
self.assertEqual(__, isinstance(string, basestring))
15+
self.assertEqual(True, isinstance(string, basestring))
1616

1717
def test_triple_quote_strings_are_also_strings(self):
1818
string = """Howdy, world!"""

0 commit comments

Comments
 (0)