From: Brian Curtin Date: Tue, 30 Nov 2010 23:46:54 +0000 (+0000) Subject: Fix #10591. Fix test_os for refleak runs. X-Git-Tag: v3.2b1~151 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c0abc4e3a485f9c43c1d98be29d76f1738d8bd01;p=thirdparty%2FPython%2Fcpython.git Fix #10591. Fix test_os for refleak runs. Split a common setUp/tearDown into the appropriate parts. --- diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 6a7013278282..835e1f20ef0c 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -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")