[Python-checkins] python/dist/src/Lib/test test_tokenize.py,1.7,1.8

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Mon, 12 May 2003 12:29:39 -0700


Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv9377/Lib/test

Modified Files:
	test_tokenize.py 
Log Message:
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.


Index: test_tokenize.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_tokenize.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** test_tokenize.py	23 Jul 2002 19:04:08 -0000	1.7
--- test_tokenize.py	12 May 2003 19:29:36 -0000	1.8
***************
*** 4,9 ****
  if verbose:
      print 'starting...'
! file = open(findfile('tokenize_tests'+os.extsep+'py'))
! tokenize.tokenize(file.readline)
  if verbose:
      print 'finished'
--- 4,12 ----
  if verbose:
      print 'starting...'
! 
! f = file(findfile('tokenize_tests'+os.extsep+'py'))
! tokenize.tokenize(f.readline)
! f.close()
! 
  if verbose:
      print 'finished'