Esempio n. 1
0
def test_get_children(tag_string, tag_name, num_children, make_tag):
    assert len(
        AbstractParserUtilities.get_children(make_tag(
            tag_string, tag_name))) == num_children
Esempio n. 2
0
def test_is_empty_true(tag_string, tag_name, make_tag):
    assert AbstractParserUtilities.is_empty(make_tag(tag_string, tag_name))
Esempio n. 3
0
def test_is_text_only_false(tag_string, tag_name, make_tag):
    assert not AbstractParserUtilities.is_text_only(
        make_tag(tag_string, tag_name))
Esempio n. 4
0
def test_is_wrapper_false(tag_string, tag_name, make_tag):
    assert not AbstractParserUtilities.is_wrapper(
        make_tag(tag_string, tag_name))
Esempio n. 5
0
def test_get_children_with_filters(tag_string, tag_name, filters, num_children,
                                   make_tag):
    tag = make_tag(tag_string, tag_name)
    assert len(AbstractParserUtilities.get_children(tag,
                                                    filters)) == num_children