Skip to content

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

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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