fix setup and teardown for test_streamify
This commit is contained in:
parent
68c906aff9
commit
3769287e88
1 changed files with 3 additions and 2 deletions
|
@ -4,7 +4,7 @@ import tempfile
|
||||||
|
|
||||||
from Crypto.Hash import MD5
|
from Crypto.Hash import MD5
|
||||||
from twisted.trial.unittest import TestCase
|
from twisted.trial.unittest import TestCase
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer, threads
|
||||||
|
|
||||||
from lbrynet import conf
|
from lbrynet import conf
|
||||||
from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager
|
from lbrynet.file_manager.EncryptedFileManager import EncryptedFileManager
|
||||||
|
@ -48,7 +48,8 @@ class TestStreamify(TestCase):
|
||||||
yield self.lbry_file_manager.stop()
|
yield self.lbry_file_manager.stop()
|
||||||
if self.session is not None:
|
if self.session is not None:
|
||||||
yield self.session.shut_down()
|
yield self.session.shut_down()
|
||||||
shutil.rmtree(self.db_dir)
|
yield self.session.storage.stop()
|
||||||
|
yield threads.deferToThread(shutil.rmtree, self.db_dir)
|
||||||
if os.path.exists("test_file"):
|
if os.path.exists("test_file"):
|
||||||
os.remove("test_file")
|
os.remove("test_file")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue