Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: test/promises-aplus/testcfg.py

Issue 297663003: Stop using urllib.urlretrieve() directly. (Closed) Base URL: git://github.com/v8/v8.git@master
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | test/test262/testcfg.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/promises-aplus/testcfg.py
diff --git a/test/promises-aplus/testcfg.py b/test/promises-aplus/testcfg.py
index a5995a361d612f57fff79a98b1090e86d5c77f2a..bd033791871fcb9f518b393141aebee088faa119 100644
--- a/test/promises-aplus/testcfg.py
+++ b/test/promises-aplus/testcfg.py
@@ -31,9 +31,9 @@ import os
import shutil
import sys
import tarfile
-import urllib
from testrunner.local import testsuite
+from testrunner.local import utils
from testrunner.objects import testcase
@@ -102,7 +102,7 @@ class PromiseAplusTestSuite(testsuite.TestSuite):
directory = os.path.join(self.root, TEST_NAME)
if not os.path.exists(archive):
print('Downloading {0} from {1} ...'.format(TEST_NAME, TEST_URL))
- urllib.urlretrieve(TEST_URL, archive)
+ utils.URLRetrieve(TEST_URL, archive)
if os.path.exists(directory):
shutil.rmtree(directory)
@@ -129,7 +129,7 @@ class PromiseAplusTestSuite(testsuite.TestSuite):
os.mkdir(directory)
path = os.path.join(directory, SINON_FILENAME)
if not os.path.exists(path):
- urllib.urlretrieve(SINON_URL, path)
+ utils.URLRetrieve(SINON_URL, path)
hash = hashlib.sha256()
with open(path, 'rb') as f:
for chunk in iter(lambda: f.read(8192), ''):
« no previous file with comments | « no previous file | test/test262/testcfg.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698