Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(33574)

Side by Side Diff: Lib/test/test_pulldom.py

Issue 16510: Using appropriate checks in tests
Patch Set: Created 6 years, 10 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/test/test_property.py ('k') | Lib/test/test_pyexpat.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 import io 1 import io
2 import unittest 2 import unittest
3 import sys 3 import sys
4 import xml.sax 4 import xml.sax
5 5
6 from xml.sax.xmlreader import AttributesImpl 6 from xml.sax.xmlreader import AttributesImpl
7 from xml.dom import pulldom 7 from xml.dom import pulldom
8 8
9 from test.support import run_unittest, findfile 9 from test.support import run_unittest, findfile
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 self.assertEqual(pulldom.CHARACTERS, evt) 63 self.assertEqual(pulldom.CHARACTERS, evt)
64 evt, node = next(items) 64 evt, node = next(items)
65 self.assertEqual("title", node.tagName) 65 self.assertEqual("title", node.tagName)
66 title_node = node 66 title_node = node
67 evt, node = next(items) 67 evt, node = next(items)
68 self.assertEqual(pulldom.CHARACTERS, evt) 68 self.assertEqual(pulldom.CHARACTERS, evt)
69 self.assertEqual("Introduction to XSL", node.data) 69 self.assertEqual("Introduction to XSL", node.data)
70 evt, node = next(items) 70 evt, node = next(items)
71 self.assertEqual(pulldom.END_ELEMENT, evt) 71 self.assertEqual(pulldom.END_ELEMENT, evt)
72 self.assertEqual("title", node.tagName) 72 self.assertEqual("title", node.tagName)
73 self.assertTrue(title_node is node) 73 self.assertIs(title_node, node)
74 evt, node = next(items) 74 evt, node = next(items)
75 self.assertEqual(pulldom.CHARACTERS, evt) 75 self.assertEqual(pulldom.CHARACTERS, evt)
76 evt, node = next(items) 76 evt, node = next(items)
77 self.assertEqual(pulldom.START_ELEMENT, evt) 77 self.assertEqual(pulldom.START_ELEMENT, evt)
78 self.assertEqual("hr", node.tagName) 78 self.assertEqual("hr", node.tagName)
79 evt, node = next(items) 79 evt, node = next(items)
80 self.assertEqual(pulldom.END_ELEMENT, evt) 80 self.assertEqual(pulldom.END_ELEMENT, evt)
81 self.assertEqual("hr", node.tagName) 81 self.assertEqual("hr", node.tagName)
82 evt, node = next(items) 82 evt, node = next(items)
83 self.assertEqual(pulldom.CHARACTERS, evt) 83 self.assertEqual(pulldom.CHARACTERS, evt)
(...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 self.assertIs(text3.parentNode, elm1) 338 self.assertIs(text3.parentNode, elm1)
339 doc.unlink() 339 doc.unlink()
340 340
341 341
342 def test_main(): 342 def test_main():
343 run_unittest(PullDOMTestCase, ThoroughTestCase, SAX2DOMTestCase) 343 run_unittest(PullDOMTestCase, ThoroughTestCase, SAX2DOMTestCase)
344 344
345 345
346 if __name__ == "__main__": 346 if __name__ == "__main__":
347 test_main() 347 test_main()
OLDNEW
« no previous file with comments | « Lib/test/test_property.py ('k') | Lib/test/test_pyexpat.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+