def test_examples():
    """
        Tests rerunning the output examples from sphaml's against the reverse parser and assert the output is nice
        and tidy sphaml
    """
    assert str(parse(EXAMPLE_1)).strip() == EXAMPLE_1_DESIRED_OUTPUT.strip()
    assert str(parse(EXAMPLE_2)).strip() == EXAMPLE_2_DESIRED_OUTPUT.strip()
    assert str(parse(EXAMPLE_3)).strip() == EXAMPLE_3_DESIRED_OUTPUT.strip()
    assert str(parse(EXAMPLE_4)).strip() == EXAMPLE_4_DESIRED_OUTPUT.strip()
    assert str(parse(EXAMPLE_5)).strip() == EXAMPLE_5_DESIRED_OUTPUT.strip()
Example #2
0
def test_examples():
    """
        Tests rerunning the output examples from sphaml's against the reverse parser and assert the output is nice
        and tidy sphaml
    """
    assert str(parse(EXAMPLE_1)).strip() == EXAMPLE_1_DESIRED_OUTPUT.strip()
    assert str(parse(EXAMPLE_2)).strip() == EXAMPLE_2_DESIRED_OUTPUT.strip()
    assert str(parse(EXAMPLE_3)).strip() == EXAMPLE_3_DESIRED_OUTPUT.strip()
    assert str(parse(EXAMPLE_4)).strip() == EXAMPLE_4_DESIRED_OUTPUT.strip()
    assert str(parse(EXAMPLE_5)).strip() == EXAMPLE_5_DESIRED_OUTPUT.strip()
def test_emptyTag():
    """
        Ensure reverse parser works around issue with sphaml and empty tags
    """
    assert str(parse("""<div></div><script></script><p></p>""")).strip(
    ) == EMPTY_TAG_EXPECTED_OUTPUT.strip()
Example #4
0
def test_emptyTag():
    """
        Ensure reverse parser works around issue with sphaml and empty tags
    """
    assert str(parse("""<div></div><script></script><p></p>""")).strip() == EMPTY_TAG_EXPECTED_OUTPUT.strip()