Skip to content

about_strings.py: Second assertion in test_if_a_string_contains_another_string passes without user intervention #1

@pavemina

Description

@pavemina

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 == __

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions