Browse Source

Calendar tests: rmtree instead remove

Bastien Sevajol (Algoo) 8 years ago
parent
commit
2d941d6847
1 changed files with 3 additions and 1 deletions
  1. 3 1
      tracim/tracim/tests/__init__.py

+ 3 - 1
tracim/tracim/tests/__init__.py View File

@@ -3,6 +3,8 @@
3 3
 import argparse
4 4
 import os
5 5
 import time
6
+
7
+import shutil
6 8
 from os import getcwd
7 9
 
8 10
 import ldap3
@@ -364,7 +366,7 @@ class TestCalendar(TestController):
364 366
         try:
365 367
             files = os.listdir(radicale_fs_path)
366 368
             for file in files:
367
-                os.remove('{0}/{1}'.format(radicale_fs_path, file))
369
+                shutil.rmtree('{0}/{1}'.format(radicale_fs_path, file))
368 370
         except FileNotFoundError:
369 371
             pass  # Dir not exists yet, no need to clear it
370 372