diff options
author | Alex Martelli <aleaxit@gmail.com> | 2006-08-24 02:58:11 (GMT) |
---|---|---|
committer | Alex Martelli <aleaxit@gmail.com> | 2006-08-24 02:58:11 (GMT) |
commit | 01c77c66289f8e9c8d15b8da623fae4014ec2edb (patch) | |
tree | f719c69719857899da42d2af8ceb48824cf4fe0d /Lib/test/test_urllib.py | |
parent | b5d47efe92fd12cde1de6a473108ef48238a43cc (diff) | |
download | cpython-01c77c66289f8e9c8d15b8da623fae4014ec2edb.zip cpython-01c77c66289f8e9c8d15b8da623fae4014ec2edb.tar.gz cpython-01c77c66289f8e9c8d15b8da623fae4014ec2edb.tar.bz2 |
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.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index 4579c47..eb962d2 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() |