Commit 11cb8135 authored by Tim Peters's avatar Tim Peters

Close the file after tokenizing it. Because the open file object was

bound to a module global, the file object remained opened throughout
the test suite run.
parent 12d55a7c
......@@ -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'
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment