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

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

Issue 10639: reindent.py converts newlines to platform default
Patch Set: Created 8 years, 8 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_urllibnet.py ('k') | Lib/test/test_urlparse.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 """Regresssion tests for urllib""" 1 """Regresssion tests for urllib"""
2 2
3 import urllib.parse 3 import urllib.parse
4 import urllib.request 4 import urllib.request
5 import urllib.error 5 import urllib.error
6 import http.client 6 import http.client
7 import email.message 7 import email.message
8 import io 8 import io
9 import unittest 9 import unittest
10 from test import support 10 from test import support
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 def test_geturl(self): 103 def test_geturl(self):
104 self.assertEqual(self.returned_obj.geturl(), self.pathname) 104 self.assertEqual(self.returned_obj.geturl(), self.pathname)
105 105
106 def test_getcode(self): 106 def test_getcode(self):
107 self.assertIsNone(self.returned_obj.getcode()) 107 self.assertIsNone(self.returned_obj.getcode())
108 108
109 def test_iter(self): 109 def test_iter(self):
110 # Test iterator 110 # Test iterator
111 # Don't need to count number of iterations since test would fail the 111 # Don't need to count number of iterations since test would fail the
112 # instant it returned anything beyond the first line from the 112 # instant it returned anything beyond the first line from the
113 # comparison. 113 # comparison
114 # Use the iterator in the usual implicit way to test for ticket #4608. 114 for line in self.returned_obj.__iter__():
115 for line in self.returned_obj:
116 self.assertEqual(line, self.text) 115 self.assertEqual(line, self.text)
117 116
118 class ProxyTests(unittest.TestCase): 117 class ProxyTests(unittest.TestCase):
119 118
120 def setUp(self): 119 def setUp(self):
121 # Records changes to env vars 120 # Records changes to env vars
122 self.env = support.EnvironmentVarGuard() 121 self.env = support.EnvironmentVarGuard()
123 # Delete all proxy related env vars 122 # Delete all proxy related env vars
124 for k in list(os.environ): 123 for k in list(os.environ):
125 if 'proxy' in k.lower(): 124 if 'proxy' in k.lower():
(...skipping 1038 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 Pathname_Tests, 1163 Pathname_Tests,
1165 Utility_Tests, 1164 Utility_Tests,
1166 URLopener_Tests, 1165 URLopener_Tests,
1167 #FTPWrapperTests, 1166 #FTPWrapperTests,
1168 ) 1167 )
1169 1168
1170 1169
1171 1170
1172 if __name__ == '__main__': 1171 if __name__ == '__main__':
1173 test_main() 1172 test_main()
OLDNEW
« no previous file with comments | « Lib/test/test_urllibnet.py ('k') | Lib/test/test_urlparse.py » ('j') | no next file with comments »

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