Kaydet (Commit) 0df2c73d authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Suppress transient refleaks in test_file2k.

üst e171edc8
...@@ -374,6 +374,7 @@ class FileThreadingTests(unittest.TestCase): ...@@ -374,6 +374,7 @@ class FileThreadingTests(unittest.TestCase):
# See #815646, #595601 # See #815646, #595601
def setUp(self): def setUp(self):
self._threads = test_support.threading_setup()
self.f = None self.f = None
self.filename = TESTFN self.filename = TESTFN
with open(self.filename, "w") as f: with open(self.filename, "w") as f:
...@@ -392,6 +393,7 @@ class FileThreadingTests(unittest.TestCase): ...@@ -392,6 +393,7 @@ class FileThreadingTests(unittest.TestCase):
os.remove(self.filename) os.remove(self.filename)
except EnvironmentError: except EnvironmentError:
pass pass
test_support.threading_cleanup(*self._threads)
def _create_file(self): def _create_file(self):
self.f = open(self.filename, "w+") self.f = open(self.filename, "w+")
......
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