summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2012-11-10 23:13:20 (GMT)
committerGregory P. Smith <greg@krypto.org>2012-11-10 23:13:20 (GMT)
commit601c0591c2423b1dae461e3b4f23777ef8af0fce (patch)
tree14ca5e4ae00b4b1a0a0a25498751f1409087f23a
parentb8f09d37912b26ded090c45fe0df6a2ee4141202 (diff)
parent6d9388faab63343db47e59eb28c926bc3cbe75d1 (diff)
downloadcpython-601c0591c2423b1dae461e3b4f23777ef8af0fce.zip
cpython-601c0591c2423b1dae461e3b4f23777ef8af0fce.tar.gz
cpython-601c0591c2423b1dae461e3b4f23777ef8af0fce.tar.bz2
Fix test_urllib broken by my previous commits. The assumptions it was
testing were added as part of the issue10050 change that caused the wrong behavior in the first place. now all test cases agree on the behavior.
-rw-r--r--Lib/test/test_urllib.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index d8c3512..52b9292 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -457,8 +457,8 @@ class urlretrieve_FileTests(unittest.TestCase):
urllib.request.urlretrieve(self.constructLocalFileUrl(srcFileName),
support.TESTFN, hooktester)
self.assertEqual(len(report), 2)
- self.assertEqual(report[0][1], 0)
- self.assertEqual(report[1][1], 5)
+ self.assertEqual(report[0][2], 5)
+ self.assertEqual(report[1][2], 5)
def test_reporthook_8193_bytes(self):
# Test on 8193 byte file. Should call reporthook only 3 times (once
@@ -471,9 +471,10 @@ class urlretrieve_FileTests(unittest.TestCase):
urllib.request.urlretrieve(self.constructLocalFileUrl(srcFileName),
support.TESTFN, hooktester)
self.assertEqual(len(report), 3)
- self.assertEqual(report[0][1], 0)
+ self.assertEqual(report[0][2], 8193)
+ self.assertEqual(report[0][1], 8192)
self.assertEqual(report[1][1], 8192)
- self.assertEqual(report[2][1], 1)
+ self.assertEqual(report[2][1], 8192)
class urlretrieve_HttpTests(unittest.TestCase, FakeHTTPMixin):