Commit c0abc4e3 authored by Brian Curtin's avatar Brian Curtin

Fix #10591. Fix test_os for refleak runs.

Split a common setUp/tearDown into the appropriate parts.
parent 715f3cd1
......@@ -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")
......
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