@@ -34,6 +34,7 @@ class BufferSizesTests(unittest.TestCase):
3434 def test_buffer_sizes (self ):
3535 # First, run the tests with default and teeny buffer size.
3636 for round , bs in (0 , 0 ), (1 , 30 ):
37+ t1 = t2 = t3 = t4 = None
3738 try :
3839 t1 = writeTmp (1 , ["Line %s of file 1\n " % (i + 1 ) for i in range (15 )])
3940 t2 = writeTmp (2 , ["Line %s of file 2\n " % (i + 1 ) for i in range (10 )])
@@ -122,6 +123,7 @@ def buffer_size_test(self, t1, t2, t3, t4, bs=0, round=0):
122123
123124class FileInputTests (unittest .TestCase ):
124125 def test_zero_byte_files (self ):
126+ t1 = t2 = t3 = t4 = None
125127 try :
126128 t1 = writeTmp (1 , ["" ])
127129 t2 = writeTmp (2 , ["" ])
@@ -145,6 +147,7 @@ def test_zero_byte_files(self):
145147 remove_tempfiles (t1 , t2 , t3 , t4 )
146148
147149 def test_files_that_dont_end_with_newline (self ):
150+ t1 = t2 = None
148151 try :
149152 t1 = writeTmp (1 , ["A\n B\n C" ])
150153 t2 = writeTmp (2 , ["D\n E\n F" ])
@@ -171,6 +174,7 @@ def test_files_that_dont_end_with_newline(self):
171174## remove_tempfiles(t1)
172175
173176 def test_fileno (self ):
177+ t1 = t2 = None
174178 try :
175179 t1 = writeTmp (1 , ["A\n B" ])
176180 t2 = writeTmp (2 , ["C\n D" ])
0 commit comments