-
Notifications
You must be signed in to change notification settings - Fork 3
/
test_cleanup.py
48 lines (45 loc) · 1.31 KB
/
test_cleanup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import glob
import os
import shutil
dir_list = [
"tests/test_data/ami",
"tests/test_data/dam_break",
"tests/test_data/query_db/nginx",
"tests/test_data/scenes/scene",
"tests/test_data/viewer_test/",
]
dir_list.extend(
[
"tests/test_data/ansys",
"tests/test_data/media",
"tests/test_data/webfonts/",
"htmltest/",
"htmltest_again/",
]
)
dir_list.append("tests/test_data/create_delete/")
dir_list.append("tests/test_data/create_twice/")
dir_list.append("tests/test_data/newcopytemp/")
dir_list.append("tests/test_data/newcopy/")
dir_list.append("tests/test_data/sameport/")
dir_list.append("tests/test_data/sameport_again/")
for i_dir in dir_list:
try:
shutil.rmtree(i_dir)
except Exception:
pass
file_list = glob.glob("tests/test_data/*.txt")
file_list.append("tests/test_data/query_db/nexus.log")
file_list.append("tests/test_data/query_db/nexus.status")
file_list.append("tests/test_data/query_db/shutdown")
file_list.append("tests/test_data/index.html")
file_list.append("tests/test_data/index.raw")
file_list.extend(glob.glob("tests/outfile*.txt"))
file_list.append("mypresentation")
file_list.append("mytest.pdf")
file_list.append("again_mytest")
for i_file in file_list:
try:
os.remove(i_file)
except Exception:
pass