mirror of
https://github.com/onionshare/onionshare.git
synced 2025-02-12 04:31:41 -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
ef5c4d46e1
commit
b08a9be2a9
@ -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…
x
Reference in New Issue
Block a user