Fixed leaking file descriptors in unit tests
These weren't any issue in Linux, but Windows doesn't like it when you try to delete a still-opened file.
This commit is contained in:
parent
fd316c4594
commit
c331b99dc6
@ -17,5 +17,7 @@ class AbstractBlendFileTest(unittest.TestCase):
|
||||
self.bf = None
|
||||
|
||||
def tearDown(self):
|
||||
if self.bf is not None:
|
||||
self.bf.close()
|
||||
self.bf = None
|
||||
blendfile.close_all_cached()
|
||||
|
||||
@ -293,6 +293,7 @@ class BlendFileCacheTest(AbstractBlendFileTest):
|
||||
self.tpath = pathlib.Path(self.tdir.name)
|
||||
|
||||
def tearDown(self):
|
||||
super().tearDown()
|
||||
self.tdir.cleanup()
|
||||
|
||||
def test_open_cached(self):
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user