Module Expr Str Import alias Import alias ImportFrom alias ImportFrom alias identifier alias alias TryExcept body ImportFrom alias Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad TryExcept body ImportFrom alias alias Assign NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameLoad ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad orelse Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str Str NameLoad If NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body With Call AttributeLoad NameLoad attr keyword NameLoad NameStore body Expr Call NameLoad Str keyword Str Expr Call NameLoad Str keyword ListLoad Str Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Str keyword Str decorator_list decorator_list ClassDef bases AttributeLoad NameLoad attr body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad decorator_list FunctionDef arguments args NameParam defaults vararg body Assign NameStore Call NameLoad BinOpAdd Str Call AttributeLoad Str attr NameLoad TupleLoad NameLoad Dict Str NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr Str Str Assign NameStore Call AttributeLoad NameLoad attr Str Str Expr Call AttributeLoad NameLoad attr Call AttributeLoad AttributeLoad NameLoad attr attr Str Str NameLoad decorator_list decorator_list
N/A N/A Tests of the builder registry. N/A unittest N/A warnings bs4 BeautifulSoup bs4.builder builder_registry registry HTMLParserTreeBuilder TreeBuilderRegistry N/A N/A bs4.builder HTML5TreeBuilder N/A HTML5LIB_PRESENT True N/A N/A N/A ImportError N/A N/A HTML5LIB_PRESENT False N/A N/A bs4.builder LXMLTreeBuilderForXML LXMLTreeBuilder N/A LXML_PRESENT True N/A N/A N/A ImportError N/A N/A LXML_PRESENT False BuiltInRegistryTest N/A N/A unittest TestCase N/A N/A Test the built-in registry with the default builders registered. test_combination N/A N/A self N/A N/A N/A LXML_PRESENT N/A N/A N/A N/A self assertEqual N/A N/A registry lookup fast html LXMLTreeBuilder N/A LXML_PRESENT N/A N/A N/A N/A self assertEqual N/A N/A registry lookup permissive xml LXMLTreeBuilderForXML N/A N/A N/A self assertEqual N/A N/A registry lookup strict html HTMLParserTreeBuilder N/A HTML5LIB_PRESENT N/A N/A N/A N/A self assertEqual N/A N/A registry lookup html5lib html HTML5TreeBuilder N/A test_lookup_by_markup_type N/A N/A self N/A N/A N/A LXML_PRESENT N/A N/A N/A N/A self assertEqual N/A N/A registry lookup html LXMLTreeBuilder N/A N/A N/A self assertEqual N/A N/A registry lookup xml LXMLTreeBuilderForXML N/A N/A N/A N/A self assertEqual N/A N/A registry lookup xml None N/A HTML5LIB_PRESENT N/A N/A N/A N/A self assertEqual N/A N/A registry lookup html HTML5TreeBuilder N/A N/A N/A N/A self assertEqual N/A N/A registry lookup html HTMLParserTreeBuilder N/A test_named_library N/A N/A self N/A N/A N/A LXML_PRESENT N/A N/A N/A N/A self assertEqual N/A N/A registry lookup lxml xml LXMLTreeBuilderForXML N/A N/A N/A self assertEqual N/A N/A registry lookup lxml html LXMLTreeBuilder N/A HTML5LIB_PRESENT N/A N/A N/A N/A self assertEqual N/A N/A registry lookup html5lib HTML5TreeBuilder N/A N/A N/A self assertEqual N/A N/A registry lookup html.parser HTMLParserTreeBuilder N/A test_beautifulsoup_constructor_does_lookup N/A N/A self N/A N/A N/A N/A N/A warnings catch_warnings record True w N/A N/A N/A BeautifulSoup features html N/A N/A BeautifulSoup features N/A html fast N/A N/A N/A self assertRaises ValueError BeautifulSoup features no-such-feature N/A N/A RegistryTest N/A N/A unittest TestCase N/A N/A Test the TreeBuilderRegistry class in general. setUp N/A N/A self N/A N/A N/A N/A self registry N/A TreeBuilderRegistry N/A builder_for_features N/A N/A self N/A feature_list N/A N/A cls N/A type N/A Builder_ N/A N/A _ join feature_list N/A object N/A features feature_list N/A N/A N/A N/A self registry register cls N/A cls N/A test_register_with_no_features N/A N/A self N/A N/A N/A builder N/A N/A self builder_for_features N/A N/A N/A self assertEqual N/A N/A N/A self registry lookup foo None N/A N/A N/A self assertEqual N/A N/A N/A self registry lookup builder N/A test_register_with_features_makes_lookup_succeed N/A N/A self N/A N/A N/A builder N/A N/A self builder_for_features foo bar N/A N/A N/A self assertEqual N/A N/A N/A self registry lookup foo builder N/A N/A N/A self assertEqual N/A N/A N/A self registry lookup bar builder N/A test_lookup_fails_when_no_builder_implements_feature N/A N/A self N/A N/A N/A builder N/A N/A self builder_for_features foo bar N/A N/A N/A self assertEqual N/A N/A N/A self registry lookup baz None N/A test_lookup_gets_most_recent_registration_when_no_feature_specified N/A N/A self N/A N/A N/A builder1 N/A N/A self builder_for_features foo N/A builder2 N/A N/A self builder_for_features bar N/A N/A N/A self assertEqual N/A N/A N/A self registry lookup builder2 N/A test_lookup_fails_when_no_tree_builders_registered N/A N/A self N/A N/A N/A N/A N/A self assertEqual N/A N/A N/A self registry lookup None N/A test_lookup_gets_most_recent_builder_supporting_all_features N/A N/A self N/A N/A N/A has_one N/A N/A self builder_for_features foo N/A has_the_other N/A N/A self builder_for_features bar N/A has_both_early N/A N/A self builder_for_features foo bar baz N/A has_both_late N/A N/A self builder_for_features foo bar quux N/A lacks_one N/A N/A self builder_for_features bar N/A has_the_other N/A N/A self builder_for_features foo N/A N/A N/A self assertEqual N/A N/A N/A self registry lookup foo bar has_both_late N/A N/A N/A self assertEqual N/A N/A N/A self registry lookup foo bar baz has_both_early N/A test_lookup_fails_when_cannot_reconcile_requested_features N/A N/A self N/A N/A N/A builder1 N/A N/A self builder_for_features foo bar N/A builder2 N/A N/A self builder_for_features foo baz N/A N/A N/A self assertEqual N/A N/A N/A self registry lookup bar baz None N/A N/A