diff options
Diffstat (limited to 'bs4/tests/test_tree.py')
-rw-r--r-- | bs4/tests/test_tree.py | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/bs4/tests/test_tree.py b/bs4/tests/test_tree.py index 43fe284..26c7bbb 100644 --- a/bs4/tests/test_tree.py +++ b/bs4/tests/test_tree.py @@ -1268,45 +1268,3 @@ class TestTreeModification(SoupTest): soup.a.string = cdata assert isinstance(soup.a.string, CData) -class TestCDAtaListAttributes(SoupTest): - - """Testing cdata-list attributes like 'class'. - """ - def test_single_value_becomes_list(self): - soup = self.soup("<a class='foo'>") - assert ["foo"] ==soup.a['class'] - - def test_multiple_values_becomes_list(self): - soup = self.soup("<a class='foo bar'>") - assert ["foo", "bar"] == soup.a['class'] - - def test_multiple_values_separated_by_weird_whitespace(self): - soup = self.soup("<a class='foo\tbar\nbaz'>") - assert ["foo", "bar", "baz"] ==soup.a['class'] - - def test_attributes_joined_into_string_on_output(self): - soup = self.soup("<a class='foo\tbar'>") - assert b'<a class="foo bar"></a>' == soup.a.encode() - - def test_get_attribute_list(self): - soup = self.soup("<a id='abc def'>") - assert ['abc def'] == soup.a.get_attribute_list('id') - - def test_accept_charset(self): - soup = self.soup('<form accept-charset="ISO-8859-1 UTF-8">') - assert ['ISO-8859-1', 'UTF-8'] == soup.form['accept-charset'] - - def test_cdata_attribute_applying_only_to_one_tag(self): - data = '<a accept-charset="ISO-8859-1 UTF-8"></a>' - soup = self.soup(data) - # We saw in another test that accept-charset is a cdata-list - # attribute for the <form> tag. But it's not a cdata-list - # attribute for any other tag. - assert 'ISO-8859-1 UTF-8' == soup.a['accept-charset'] - - def test_string_has_immutable_name_property(self): - string = self.soup("s").string - assert None == string.name - with pytest.raises(AttributeError): - string.name = 'foo' - |