summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_tokenize.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/Lib/test/test_tokenize.py b/Lib/test/test_tokenize.py
index e3fbb15..22a1d90 100644
--- a/Lib/test/test_tokenize.py
+++ b/Lib/test/test_tokenize.py
@@ -3,7 +3,10 @@ import tokenize, os, sys
if verbose:
print 'starting...'
-file = open(findfile('tokenize_tests'+os.extsep+'py'))
-tokenize.tokenize(file.readline)
+
+f = file(findfile('tokenize_tests'+os.extsep+'py'))
+tokenize.tokenize(f.readline)
+f.close()
+
if verbose:
print 'finished'