class documentation

class TestFormatters(SoupTest): (source)

View In Hierarchy

Test the formatting feature, used by methods like decode() and prettify(), and the formatters themselves.

Method test_default_formatter_is_minimal Undocumented
Method test_encoding_substitution Undocumented
Method test_encoding_substitution_doesnt_happen_if_tag_is_strained Undocumented
Method test_formatter_custom Undocumented
Method test_formatter_html Undocumented
Method test_formatter_html5 Undocumented
Method test_formatter_is_run_on_attribute_values Undocumented
Method test_formatter_minimal Undocumented
Method test_formatter_null Undocumented
Method test_formatter_skips_script_tag_for_html_documents Undocumented
Method test_formatter_skips_style_tag_for_html_documents Undocumented
Method test_html_entity_substitution_off_by_default Undocumented
Method test_prettify_accepts_formatter_function Undocumented
Method test_prettify_can_encode_data Undocumented
Method test_prettify_leaves_preformatted_text_alone Undocumented
Method test_prettify_outputs_unicode_by_default 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_formatter_is_minimal(self): (source)

Undocumented

def test_encoding_substitution(self): (source)

Undocumented

def test_encoding_substitution_doesnt_happen_if_tag_is_strained(self): (source)

Undocumented

def test_formatter_custom(self): (source)

Undocumented

def test_formatter_html(self): (source)

Undocumented

def test_formatter_html5(self): (source)

Undocumented

def test_formatter_is_run_on_attribute_values(self): (source)

Undocumented

def test_formatter_minimal(self): (source)

Undocumented

def test_formatter_null(self): (source)

Undocumented

def test_formatter_skips_script_tag_for_html_documents(self): (source)

Undocumented

def test_formatter_skips_style_tag_for_html_documents(self): (source)

Undocumented

def test_html_entity_substitution_off_by_default(self): (source)

Undocumented

def test_prettify_accepts_formatter_function(self): (source)

Undocumented

def test_prettify_can_encode_data(self): (source)

Undocumented

def test_prettify_leaves_preformatted_text_alone(self): (source)

Undocumented

def test_prettify_outputs_unicode_by_default(self): (source)

Undocumented