tests: rm some redundant "electrum_path" temp dirs
This commit is contained in:
@@ -319,14 +319,11 @@ class TestStorageUpgrade(WalletTestCase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super().setUp()
|
super().setUp()
|
||||||
self.__electrum_path = tempfile.mkdtemp()
|
|
||||||
config = SimpleConfig({'electrum_path': self.__electrum_path})
|
|
||||||
gui_name = 'cmdline'
|
gui_name = 'cmdline'
|
||||||
# TODO it's probably wasteful to load all plugins... only need Trezor
|
# 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):
|
def tearDown(self):
|
||||||
shutil.rmtree(self.__electrum_path)
|
|
||||||
self.plugins.stop()
|
self.plugins.stop()
|
||||||
self.plugins.stopped_event.wait()
|
self.plugins.stopped_event.wait()
|
||||||
super().tearDown()
|
super().tearDown()
|
||||||
|
|||||||
@@ -36,10 +36,9 @@ class WalletTestCase(ElectrumTestCase):
|
|||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
super(WalletTestCase, self).setUp()
|
super(WalletTestCase, self).setUp()
|
||||||
self.user_dir = tempfile.mkdtemp()
|
self.config = SimpleConfig({'electrum_path': self.electrum_path})
|
||||||
self.config = SimpleConfig({'electrum_path': self.user_dir})
|
|
||||||
|
|
||||||
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._saved_stdout = sys.stdout
|
||||||
self._stdout_buffer = StringIO()
|
self._stdout_buffer = StringIO()
|
||||||
@@ -47,7 +46,6 @@ class WalletTestCase(ElectrumTestCase):
|
|||||||
|
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
super(WalletTestCase, self).tearDown()
|
super(WalletTestCase, self).tearDown()
|
||||||
shutil.rmtree(self.user_dir)
|
|
||||||
# Restore the "real" stdout
|
# Restore the "real" stdout
|
||||||
sys.stdout = self._saved_stdout
|
sys.stdout = self._saved_stdout
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user