Skip to content

Commit bb6456a

Browse files
committed
Fix pyflakes warnings
1 parent d09d843 commit bb6456a

File tree

1 file changed

+2
-37
lines changed

1 file changed

+2
-37
lines changed

supervisor/tests/test_templating.py

Lines changed: 2 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ def test_clone_simple(self):
683683
div.tail = ' '
684684
span = self._makeOne('span', {})
685685
div.append(span)
686-
div2 = div.clone()
686+
div.clone()
687687

688688
def test_clone(self):
689689
div = self._makeOne('div', {'id':'thediv'})
@@ -811,10 +811,6 @@ def test_shortrepr(self):
811811
div = self._makeOne('div', {'id':'div1'})
812812
span = self._makeOne('span', {})
813813
span2 = self._makeOne('span', {'id':'2'})
814-
span3 = self._makeOne('span3', {'id':'3'})
815-
span4 = self._makeOne('span4', {'id':'4'})
816-
span5 = self._makeOne('span5', {'id':'5'})
817-
span6 = self._makeOne('span6', {'id':'6'})
818814
div2 = self._makeOne('div2', {'id':'div2'})
819815
div.append(span)
820816
span.append(span2)
@@ -1169,7 +1165,7 @@ def test_parse_complex_xhtml(self):
11691165
self.assertEqual(title.tag, xhtml_ns % 'title')
11701166
self.assertEqual(title.attrib[_MELD_ID], 'title')
11711167
self.assertEqual(title.parent, head)
1172-
comment = root[1]
1168+
11731169
body = root[2]
11741170
self.assertEqual(body.tag, xhtml_ns % 'body')
11751171
self.assertEqual(body.attrib, {})
@@ -1251,22 +1247,16 @@ def test_nvu_html(self):
12511247
comment = body[0]
12521248
self.assertEqual(comment.tag, Comment)
12531249

1254-
br1 = body[1]
1255-
br2 = body[2]
12561250
table = body[3]
1257-
12581251
self.assertEqual(table.tag, 'table')
12591252
self.assertEqual(table.attrib, {'style':
12601253
'text-align: left; width: 100px;',
12611254
'border':'1',
12621255
'cellpadding':'2',
12631256
'cellspacing':'2'})
12641257
self.assertEqual(table.parent, body)
1265-
br3 = body[4]
12661258
href = body[5]
12671259
self.assertEqual(href.tag, 'a')
1268-
br4 = body[6]
1269-
br5 = body[7]
12701260
img = body[8]
12711261
self.assertEqual(img.tag, 'img')
12721262

@@ -1676,31 +1666,6 @@ def test_write_simple_xhtml_as_html_new_doctype(self):
16761666
<html><body>Hello!</body></html>"""
16771667
self.assertNormalizedXMLEqual(actual, expected)
16781668

1679-
def test_write_entities_xhtml_no_doctype(self):
1680-
root = self._parse_html(_ENTITIES_XHTML)
1681-
# this will be considered an XHTML document by default; we needn't
1682-
# declare a doctype
1683-
actual = self._write_xhtml(root)
1684-
expected =r"""<html>
1685-
<head></head>
1686-
<body>
1687-
<!-- test entity references -->
1688-
<p>&nbsp;</p>
1689-
</body>
1690-
</html>"""
1691-
1692-
def test_write_entities_xhtml_with_doctype(self):
1693-
dt = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'
1694-
root = self._parse_html(dt + _ENTITIES_XHTML)
1695-
actual = self._write_xhtml(root)
1696-
expected =r"""<html>
1697-
<head></head>
1698-
<body>
1699-
<!-- test entity references -->
1700-
<p>&nbsp;</p>
1701-
</body>
1702-
</html>"""
1703-
17041669
def test_unknown_entity(self):
17051670
# exception thrown may vary by python or expat version
17061671
from xml.parsers import expat

0 commit comments

Comments
 (0)