summaryrefslogtreecommitdiff
path: root/Lib/test/test_os.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_os.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_os.py')
-rw-r--r--Lib/test/test_os.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 9497777218..bf0e196e67 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -273,7 +273,7 @@ class WalkTests(unittest.TestCase):
os.makedirs(sub11_path)
os.makedirs(sub2_path)
for path in tmp1_path, tmp2_path, tmp3_path:
- f = file(path, "w")
+ f = open(path, "w")
f.write("I'm " + path + " and proud of it. Blame test_os.\n")
f.close()
@@ -361,10 +361,10 @@ class MakedirTests (unittest.TestCase):
class DevNullTests (unittest.TestCase):
def test_devnull(self):
- f = file(os.devnull, 'w')
+ f = open(os.devnull, 'w')
f.write('hello')
f.close()
- f = file(os.devnull, 'r')
+ f = open(os.devnull, 'r')
self.assertEqual(f.read(), '')
f.close()