diff options
author | Kenneth Skovhede <kenneth@hexad.dk> | 2018-11-29 12:59:33 +0300 |
---|---|---|
committer | Kenneth Skovhede <kenneth@hexad.dk> | 2018-11-29 12:59:33 +0300 |
commit | 7d4f711370ba4958b5202edbb96fdc9253e224ae (patch) | |
tree | 0aaabb48d4c62854b5ea32a67e9547e323548045 /guiTests | |
parent | 5d267002ad0e49d7890f70b57aa8c7150ec66fd0 (diff) |
Added robustness to GUI tests
Diffstat (limited to 'guiTests')
-rw-r--r-- | guiTests/guiTest.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/guiTests/guiTest.py b/guiTests/guiTest.py index 9a6695791..07238b700 100644 --- a/guiTests/guiTest.py +++ b/guiTests/guiTest.py @@ -159,8 +159,10 @@ wait_for_text(60, "//form[@id='restore']/div[3]/h3/div[1]", "Your files and fold sha1_restore = sha1_folder(RESTORE_FOLDER) # cleanup: delete source and restore folder and rename destination folder for direct restore -shutil.rmtree(SOURCE_FOLDER) -shutil.rmtree(RESTORE_FOLDER) +if os.path.exists(SOURCE_FOLDER): + shutil.rmtree(SOURCE_FOLDER) +if os.path.exists(RESTORE_FOLDER): + shutil.rmtree(RESTORE_FOLDER) os.rename(DESTINATION_FOLDER, DESTINATION_FOLDER_DIRECT_RESTORE) # direct restore |