class documentation

class TestFormatter(SoupTest): (source)

View In Hierarchy

Undocumented

Method test_default_attributes Undocumented
Method test_default_indent_value Undocumented
Method test_empty_attributes_are_booleans Undocumented
Method test_indent Undocumented
Method test_sort_attributes Undocumented

Inherited from SoupTest:

Method assert_selects Make sure that the given tags have the correct text.
Method assert_selects_ids Make sure that the given tags have the correct IDs.
Method assert_soup Parse some markup using Beautiful Soup and verify that the output markup is as expected.
Method assertConnectedness Ensure that next_element and previous_element are properly set for all descendants of the given element.
Method document_for Turn an HTML fragment into a document.
Method linkage_validator Ensure proper linkage throughout the document.
Method soup Build a Beautiful Soup object from markup.
Property default_builder Undocumented
def test_default_attributes(self): (source)

Undocumented

def test_default_indent_value(self): (source)

Undocumented

def test_empty_attributes_are_booleans(self): (source)

Undocumented

@pytest.mark.parametrize('indent,expect', [(None, '<a>\n<b>\ntext\n</b>\n</a>'), (-1, '<a>\n<b>\ntext\n</b>\n</a>'), (0, '<a>\n<b>\ntext\n</b>\n</a>'), ('', '<a>\n<b>\ntext\n</b>\n</a>'), (1, '<a>\n <b>\n text\n </b>\n</a>'), (2, '<a>\n <b>\n text\n </b>\n</a>'), ('\t', '<a>\n\t<b>\n\t\ttext\n\t</b>\n</a>'), ('abc', '<a>\nabc<b>\nabcabctext\nabc</b>\n</a>'), (object(), '<a>\n <b>\n text\n </b>\n</a>'), (b'bytes', '<a>\n <b>\n text\n </b>\n</a>')])
def test_indent(self, indent, expect): (source)

Undocumented

def test_sort_attributes(self): (source)

Undocumented