diff --git a/tests/test_backup.py b/tests/test_backup.py
index 8c57428af06e7b541cb8734a8d4261b7fdce43fe..6deec00e2223f014a87fd417a75478373afa509f 100755
--- a/tests/test_backup.py
+++ b/tests/test_backup.py
@@ -93,6 +93,8 @@ def check_backup_is_incremental(path):
             print('%s: %s' % (d, num_folders))
             if num_folders == 0:
                 print('Folder %s is empty, this indicates non-incremental backups (we are expecting links)' % folder_path)
+                os.rmdir(folder_path)
+                print('Folder removed')
                 return False
     return True