Browse Source

Calendar tests: rmtree instead remove

Bastien Sevajol (Algoo) 9 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
 import argparse
3
 import argparse
4
 import os
4
 import os
5
 import time
5
 import time
6
+
7
+import shutil
6
 from os import getcwd
8
 from os import getcwd
7
 
9
 
8
 import ldap3
10
 import ldap3
364
         try:
366
         try:
365
             files = os.listdir(radicale_fs_path)
367
             files = os.listdir(radicale_fs_path)
366
             for file in files:
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
         except FileNotFoundError:
370
         except FileNotFoundError:
369
             pass  # Dir not exists yet, no need to clear it
371
             pass  # Dir not exists yet, no need to clear it
370
 
372