@@ -20,14 +20,8 @@ def test_did():
20
20
)
21
21
assert isinstance (df , pd .DataFrame )
22
22
assert isinstance (result , cp .pymc_experiments .DifferenceInDifferences )
23
- assert (
24
- len (result .prediction_model .idata .posterior .coords ["chain" ])
25
- == sample_kwargs ["chains" ]
26
- )
27
- assert (
28
- len (result .prediction_model .idata .posterior .coords ["draw" ])
29
- == sample_kwargs ["draws" ]
30
- )
23
+ assert len (result .idata .posterior .coords ["chain" ]) == sample_kwargs ["chains" ]
24
+ assert len (result .idata .posterior .coords ["draw" ]) == sample_kwargs ["draws" ]
31
25
32
26
33
27
@pytest .mark .integration
@@ -61,14 +55,8 @@ def test_did_banks():
61
55
)
62
56
assert isinstance (df , pd .DataFrame )
63
57
assert isinstance (result , cp .pymc_experiments .DifferenceInDifferences )
64
- assert (
65
- len (result .prediction_model .idata .posterior .coords ["chain" ])
66
- == sample_kwargs ["chains" ]
67
- )
68
- assert (
69
- len (result .prediction_model .idata .posterior .coords ["draw" ])
70
- == sample_kwargs ["draws" ]
71
- )
58
+ assert len (result .idata .posterior .coords ["chain" ]) == sample_kwargs ["chains" ]
59
+ assert len (result .idata .posterior .coords ["draw" ]) == sample_kwargs ["draws" ]
72
60
73
61
74
62
@pytest .mark .integration
@@ -82,14 +70,8 @@ def test_rd():
82
70
)
83
71
assert isinstance (df , pd .DataFrame )
84
72
assert isinstance (result , cp .pymc_experiments .RegressionDiscontinuity )
85
- assert (
86
- len (result .prediction_model .idata .posterior .coords ["chain" ])
87
- == sample_kwargs ["chains" ]
88
- )
89
- assert (
90
- len (result .prediction_model .idata .posterior .coords ["draw" ])
91
- == sample_kwargs ["draws" ]
92
- )
73
+ assert len (result .idata .posterior .coords ["chain" ]) == sample_kwargs ["chains" ]
74
+ assert len (result .idata .posterior .coords ["draw" ]) == sample_kwargs ["draws" ]
93
75
94
76
95
77
@pytest .mark .integration
@@ -108,14 +90,8 @@ def test_rd_drinking():
108
90
)
109
91
assert isinstance (df , pd .DataFrame )
110
92
assert isinstance (result , cp .pymc_experiments .RegressionDiscontinuity )
111
- assert (
112
- len (result .prediction_model .idata .posterior .coords ["chain" ])
113
- == sample_kwargs ["chains" ]
114
- )
115
- assert (
116
- len (result .prediction_model .idata .posterior .coords ["draw" ])
117
- == sample_kwargs ["draws" ]
118
- )
93
+ assert len (result .idata .posterior .coords ["chain" ]) == sample_kwargs ["chains" ]
94
+ assert len (result .idata .posterior .coords ["draw" ]) == sample_kwargs ["draws" ]
119
95
120
96
121
97
@pytest .mark .integration
@@ -132,14 +108,8 @@ def test_its():
132
108
)
133
109
assert isinstance (df , pd .DataFrame )
134
110
assert isinstance (result , cp .pymc_experiments .SyntheticControl )
135
- assert (
136
- len (result .prediction_model .idata .posterior .coords ["chain" ])
137
- == sample_kwargs ["chains" ]
138
- )
139
- assert (
140
- len (result .prediction_model .idata .posterior .coords ["draw" ])
141
- == sample_kwargs ["draws" ]
142
- )
111
+ assert len (result .idata .posterior .coords ["chain" ]) == sample_kwargs ["chains" ]
112
+ assert len (result .idata .posterior .coords ["draw" ]) == sample_kwargs ["draws" ]
143
113
144
114
145
115
@pytest .mark .integration
@@ -156,14 +126,8 @@ def test_its_covid():
156
126
)
157
127
assert isinstance (df , pd .DataFrame )
158
128
assert isinstance (result , cp .pymc_experiments .SyntheticControl )
159
- assert (
160
- len (result .prediction_model .idata .posterior .coords ["chain" ])
161
- == sample_kwargs ["chains" ]
162
- )
163
- assert (
164
- len (result .prediction_model .idata .posterior .coords ["draw" ])
165
- == sample_kwargs ["draws" ]
166
- )
129
+ assert len (result .idata .posterior .coords ["chain" ]) == sample_kwargs ["chains" ]
130
+ assert len (result .idata .posterior .coords ["draw" ]) == sample_kwargs ["draws" ]
167
131
168
132
169
133
@pytest .mark .integration
@@ -178,14 +142,8 @@ def test_sc():
178
142
)
179
143
assert isinstance (df , pd .DataFrame )
180
144
assert isinstance (result , cp .pymc_experiments .SyntheticControl )
181
- assert (
182
- len (result .prediction_model .idata .posterior .coords ["chain" ])
183
- == sample_kwargs ["chains" ]
184
- )
185
- assert (
186
- len (result .prediction_model .idata .posterior .coords ["draw" ])
187
- == sample_kwargs ["draws" ]
188
- )
145
+ assert len (result .idata .posterior .coords ["chain" ]) == sample_kwargs ["chains" ]
146
+ assert len (result .idata .posterior .coords ["draw" ]) == sample_kwargs ["draws" ]
189
147
190
148
191
149
@pytest .mark .integration
@@ -210,14 +168,8 @@ def test_sc_brexit():
210
168
)
211
169
assert isinstance (df , pd .DataFrame )
212
170
assert isinstance (result , cp .pymc_experiments .SyntheticControl )
213
- assert (
214
- len (result .prediction_model .idata .posterior .coords ["chain" ])
215
- == sample_kwargs ["chains" ]
216
- )
217
- assert (
218
- len (result .prediction_model .idata .posterior .coords ["draw" ])
219
- == sample_kwargs ["draws" ]
220
- )
171
+ assert len (result .idata .posterior .coords ["chain" ]) == sample_kwargs ["chains" ]
172
+ assert len (result .idata .posterior .coords ["draw" ]) == sample_kwargs ["draws" ]
221
173
222
174
223
175
@pytest .mark .integration
0 commit comments