summaryrefslogtreecommitdiff
path: root/Lib/test/test_urllib.py
diff options
context:
space:
mode:
authorAlex Martelli <aleaxit@gmail.com>2006-08-24 02:58:11 +0000
committerAlex Martelli <aleaxit@gmail.com>2006-08-24 02:58:11 +0000
commit01c77c66289f8e9c8d15b8da623fae4014ec2edb (patch)
treef719c69719857899da42d2af8ceb48824cf4fe0d /Lib/test/test_urllib.py
parentb5d47efe92fd12cde1de6a473108ef48238a43cc (diff)
downloadcpython-git-01c77c66289f8e9c8d15b8da623fae4014ec2edb.tar.gz
Anna Ravenscroft identified many occurrences of "file" used to open a file
in the stdlib and changed each of them to use "open" instead. At this time there are no other known occurrences that can be safely changed (in Lib and all subdirectories thereof).
Diffstat (limited to 'Lib/test/test_urllib.py')
-rw-r--r--Lib/test/test_urllib.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py
index 4579c479d1..eb962d2491 100644
--- a/Lib/test/test_urllib.py
+++ b/Lib/test/test_urllib.py
@@ -27,7 +27,7 @@ class urlopen_FileTests(unittest.TestCase):
def setUp(self):
"""Setup of a temp file to use for testing"""
self.text = "test_urllib: %s\n" % self.__class__.__name__
- FILE = file(test_support.TESTFN, 'wb')
+ FILE = open(test_support.TESTFN, 'wb')
try:
FILE.write(self.text)
finally:
@@ -139,7 +139,7 @@ class urlretrieve_FileTests(unittest.TestCase):
self.registerFileForCleanUp(test_support.TESTFN)
self.text = 'testing urllib.urlretrieve'
try:
- FILE = file(test_support.TESTFN, 'wb')
+ FILE = open(test_support.TESTFN, 'wb')
FILE.write(self.text)
FILE.close()
finally:
@@ -192,7 +192,7 @@ class urlretrieve_FileTests(unittest.TestCase):
self.assertEqual(second_temp, result[0])
self.assert_(os.path.exists(second_temp), "copy of the file was not "
"made")
- FILE = file(second_temp, 'rb')
+ FILE = open(second_temp, 'rb')
try:
text = FILE.read()
FILE.close()