diff options
author | Aaron DeVore <aaron.devore@gmail.com> | 2011-03-05 02:44:00 -0800 |
---|---|---|
committer | Aaron DeVore <aaron.devore@gmail.com> | 2011-03-05 02:44:00 -0800 |
commit | 32050a613a3eff5f53c6395ea365159226351946 (patch) | |
tree | 6249a826867102d2e2ced601a8ee99ae3344ba75 /tests/test_tree.py | |
parent | 037b6e32bdea1ee73a62284d60f456b6a39b96af (diff) |
PEP8ifying
Diffstat (limited to 'tests/test_tree.py')
-rw-r--r-- | tests/test_tree.py | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/tests/test_tree.py b/tests/test_tree.py index 3862d7d..a6ad000 100644 --- a/tests/test_tree.py +++ b/tests/test_tree.py @@ -557,22 +557,22 @@ class TestTreeModification(SoupTest): '<body><a href="http://foo.com/"></a><ol></ol></body>') def test_append_to_contents_moves_tag(self): - doc = """<p id="1">Don't leave me <b>here</b>.</p> + doc = """<p id="1">Don't leave me <b>here</b>.</p> <p id="2">Don\'t leave!</p>""" - soup = self.soup(doc) - second_para = soup.find(id='2') - bold = soup.b + soup = self.soup(doc) + second_para = soup.find(id='2') + bold = soup.b - # Move the <b> tag to the end of the second paragraph. - soup.find(id='2').append(soup.b) + # Move the <b> tag to the end of the second paragraph. + soup.find(id='2').append(soup.b) - # The <b> tag is now a child of the second paragraph. - self.assertEqual(bold.parent, second_para) + # The <b> tag is now a child of the second paragraph. + self.assertEqual(bold.parent, second_para) - self.assertEqual( - soup.decode(), self.document_for( - '<p id="1">Don\'t leave me .</p>\n' - '<p id="2">Don\'t leave!<b>here</b></p>')) + self.assertEqual( + soup.decode(), self.document_for( + '<p id="1">Don\'t leave me .</p>\n' + '<p id="2">Don\'t leave!<b>here</b></p>')) def test_replace_tag_with_itself(self): text = "<a><b></b><c>Foo<d></d></c></a><a><e></e></a>" @@ -700,7 +700,7 @@ class TestTreeModification(SoupTest): self.assertEqual(to_text.next, g_tag) self.assertEqual(to_text.next_sibling, g_tag) self.assertEqual(g_tag.previous, to_text) - self.assertEqual(g_tag.previous_sibling, to_text) + self.assertEqual(g_tag.previous_sibling, to_text) def test_replace_with_children(self): tree = self.soup(""" |