-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtests.py
137 lines (101 loc) · 3.1 KB
/
tests.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
from cellar_extractor import *
from echr_extractor import *
from rechtspraak_extractor import *
def echr_y():
get_echr(save_file='y',count=100,start_date='2022-01-01')
def echr_n():
get_echr(save_file='n',count=100,start_date='2022-01-01')
def echr_extra_y():
get_echr_extra(save_file='n',count=100,start_date='2022-01-01')
def echr_extra_n():
get_echr_extra(save_file='n',count=100,start_date='2022-01-01')
def rechtspraak_n():
df = get_rechtspraak(max_ecli=100,sd='2022-01-01',save_file='n')
get_rechtspraak_metadata(save_file='n',dataframe=df)
def rechtspraak_y():
df = get_rechtspraak(max_ecli=100,sd='2022-01-01',save_file='y')
get_rechtspraak_metadata(save_file='y',dataframe=df)
def cellar_csv_n():
get_cellar(save_file='n', file_format='csv', sd='2022-01-01', max_ecli=100)
def cellar_csv_y():
get_cellar(save_file='y', file_format='csv', sd='2022-01-01', max_ecli=100)
def cellar_json_n():
get_cellar(save_file='n', file_format='json', sd='2022-01-01', max_ecli=100)
def cellar_json_y():
get_cellar(save_file='y', file_format='json', sd='2022-01-01', max_ecli=100)
def cellar_extra_y():
get_cellar_extra(save_file='y', max_ecli=10, sd='2022-01-01', threads=10)
def cellar_extra_n():
get_cellar_extra(save_file='n', max_ecli=10, sd='2022-01-01', threads=10)
def test_cellar_extra_y():
try:
cellar_extra_y()
assert True
except Exception:
assert False, "Saving extra cellar failed"
def test_cellar_extra_n():
try:
cellar_extra_n()
assert True
except Exception:
assert False, "Downloading extra cellar failed"
def test_cellar_csv_y():
try:
cellar_csv_y()
assert True
except Exception:
assert False, "Saving cellar as csv failed."
def test_cellar_csv_n():
try:
cellar_csv_n()
assert True
except Exception:
assert False, "Downloading cellar as csv failed."
def test_cellar_json_y():
try:
cellar_csv_y()
assert True
except Exception:
assert False, "Saving cellar as json failed."
def test_cellar_json_n():
try:
cellar_csv_y()
assert True
except Exception:
assert False, "Downloading cellar as json failed."
def test_echr_extra_y():
try:
echr_extra_y()
assert True
except Exception:
assert False, "Saving extra echr failed"
def test_echr_extra_n():
try:
echr_extra_n()
assert True
except Exception:
assert False, "Downloading extra echr failed"
def test_echr_y():
try:
echr_y()
assert True
except Exception:
assert False, "Saving echr failed"
def test_echr_n():
try:
echr_n()
assert True
except Exception:
assert False, "Downloading echr failed"
def test_rechtspraak_y():
try:
rechtspraak_y()
assert True
except Exception:
assert False, "Saving extra rechtspraak failed"
def test_rechtspraak_n():
try:
rechtspraak_n()
assert True
except Exception:
assert False, "Downloading extra rechtspraak failed"