Fix #10591. Fix test_os for refleak runs.
authorBrian Curtin <brian.curtin@gmail.com>
Tue, 30 Nov 2010 23:46:54 +0000 (23:46 +0000)
committerBrian Curtin <brian.curtin@gmail.com>
Tue, 30 Nov 2010 23:46:54 +0000 (23:46 +0000)
Split a common setUp/tearDown into the appropriate parts.

Lib/test/test_os.py

index 6a70132782825e5c546058393a4e5614df2cb708..835e1f20ef0cee5a81718ca89749b4332fcec29f 100644 (file)
@@ -866,12 +866,11 @@ class LinkTests(unittest.TestCase):
         self.file1 = support.TESTFN
         self.file2 = os.path.join(support.TESTFN + "2")
 
+    def tearDown(self):
         for file in (self.file1, self.file2):
             if os.path.exists(file):
                 os.unlink(file)
 
-    tearDown = setUp
-
     def _test_link(self, file1, file2):
         with open(file1, "w") as f1:
             f1.write("test")