mirror of
https://github.com/onionshare/onionshare.git
synced 2025-01-13 08:19:28 -05:00
Before running tests delete test common data dir, and after running tests stop trying to delete the tmpdir because it gets deteleted automatically
This commit is contained in:
parent
35880c0070
commit
48425e230f
@ -27,6 +27,10 @@ class GuiBaseTest(unittest.TestCase):
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
common = Common(verbose=True)
|
||||
|
||||
# Delete any old test data that might exist
|
||||
shutil.rmtree(common.build_data_dir(), ignore_errors=True)
|
||||
|
||||
qtapp = Application(common)
|
||||
common.gui = GuiCommon(common, qtapp, local_only=True)
|
||||
cls.gui = MainWindow(common, filenames=None)
|
||||
@ -59,10 +63,6 @@ class GuiBaseTest(unittest.TestCase):
|
||||
cls.gui.close()
|
||||
|
||||
cls.gui.cleanup()
|
||||
try:
|
||||
shutil.rmtree(cls.tmpdir.name, ignore_errors=True)
|
||||
except:
|
||||
pass
|
||||
|
||||
# Shared test methods
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user