is_dog_in is expected to evaluate to False, and since __ is defined as False at the top of the file, the second assertion in the test passes without the student having to change __ to False. (this assumes that the first assertion in the test has already been fixed)
|
def test_if_a_string_contains_another_string(self): |
|
|
|
string = "Pears, lettuce and tomato" |
|
is_lettuce_in = "lettuce" in string |
|
|
|
assert is_lettuce_in == __ |
|
|
|
is_dog_in = "dog" in string |
|
|
|
assert is_dog_in == __ |
is_dog_inis expected to evaluate toFalse, and since__is defined asFalseat the top of the file, the second assertion in the test passes without the student having to change__toFalse. (this assumes that the first assertion in the test has already been fixed)python-koans/koans/about_strings.py
Lines 89 to 98 in 30d866a