示例#1
0
def test_strip(fake_html_4):
    soup = Soup(fake_html_4)
    result = soup.strip()
    if (result !=
            "I like soup and I really like cold soup I guess hot soup is okay too"
        ):
        raise AssertionError
示例#2
0
def test_strip_keep_whitespace(fake_html_4):
    soup = Soup(fake_html_4)
    result = soup.strip(whitespace=False)
    if (result !=
            "    \n      I like soup and I really like cold soup\n      I guess hot soup is okay too\n    \n    "
        ):
        raise AssertionError
示例#3
0
def test_strip(fake_html_4):
    soup = Soup(fake_html_4)
    result = soup.strip()
    assert (
        result == "I like soup and I really like cold soup I guess hot soup is okay too"
    )