1
0

tests: rm some redundant "electrum_path" temp dirs

This commit is contained in:
SomberNight
2023-09-06 14:10:11 +00:00
parent 4f90632b1d
commit dd3966070d
2 changed files with 3 additions and 8 deletions

View File

@@ -319,14 +319,11 @@ class TestStorageUpgrade(WalletTestCase):
def setUp(self):
super().setUp()
self.__electrum_path = tempfile.mkdtemp()
config = SimpleConfig({'electrum_path': self.__electrum_path})
gui_name = 'cmdline'
# TODO it's probably wasteful to load all plugins... only need Trezor
self.plugins = Plugins(config, gui_name)
self.plugins = Plugins(self.config, gui_name)
def tearDown(self):
shutil.rmtree(self.__electrum_path)
self.plugins.stop()
self.plugins.stopped_event.wait()
super().tearDown()

View File

@@ -36,10 +36,9 @@ class WalletTestCase(ElectrumTestCase):
def setUp(self):
super(WalletTestCase, self).setUp()
self.user_dir = tempfile.mkdtemp()
self.config = SimpleConfig({'electrum_path': self.user_dir})
self.config = SimpleConfig({'electrum_path': self.electrum_path})
self.wallet_path = os.path.join(self.user_dir, "somewallet")
self.wallet_path = os.path.join(self.electrum_path, "somewallet")
self._saved_stdout = sys.stdout
self._stdout_buffer = StringIO()
@@ -47,7 +46,6 @@ class WalletTestCase(ElectrumTestCase):
def tearDown(self):
super(WalletTestCase, self).tearDown()
shutil.rmtree(self.user_dir)
# Restore the "real" stdout
sys.stdout = self._saved_stdout