1
1
from __future__ import division
2
2
3
3
from numpy .testing import assert_almost_equal
4
- from numpy .testing .decorators import slow
4
+
5
+ import pytest
6
+
5
7
from statsmodels .regression .linear_model import OLS
6
8
from statsmodels .tools import add_constant
7
9
from .results .el_results import RegressionResults
@@ -33,14 +35,14 @@ class TestRegressionPowell(GenRes):
33
35
34
36
"""
35
37
36
- @slow
38
+ @pytest . mark . slow
37
39
def test_hypothesis_beta0 (self ):
38
40
beta0res = self .res1 .el_test ([- 30 ], [0 ], return_weights = 1 ,
39
41
method = 'powell' )
40
42
assert_almost_equal (beta0res [:2 ], self .res2 .test_beta0 [:2 ], 4 )
41
43
assert_almost_equal (beta0res [2 ], self .res2 .test_beta0 [2 ], 4 )
42
44
43
- @slow
45
+ @pytest . mark . slow
44
46
def test_hypothesis_beta1 (self ):
45
47
beta1res = self .res1 .el_test ([.5 ], [1 ], return_weights = 1 ,
46
48
method = 'powell' )
@@ -106,14 +108,14 @@ def test_hypothesis_beta1(self):
106
108
assert_almost_equal (beta1res [:2 ], self .res2 .test_beta1 [:2 ], 4 )
107
109
assert_almost_equal (beta1res [2 ], self .res2 .test_beta1 [2 ], 4 )
108
110
109
- @slow
111
+ @pytest . mark . slow
110
112
def test_hypothesis_beta2 (self ):
111
113
beta2res = self .res1 .el_test ([1 ], [2 ], return_weights = 1 ,
112
114
method = 'nm' )
113
115
assert_almost_equal (beta2res [:2 ], self .res2 .test_beta2 [:2 ], 4 )
114
116
assert_almost_equal (beta2res [2 ], self .res2 .test_beta2 [2 ], 4 )
115
117
116
- @slow
118
+ @pytest . mark . slow
117
119
def test_hypothesis_beta3 (self ):
118
120
beta3res = self .res1 .el_test ([0 ], [3 ], return_weights = 1 ,
119
121
method = 'nm' )
@@ -122,7 +124,7 @@ def test_hypothesis_beta3(self):
122
124
123
125
# Confidence interval results obtained through hyp testing in Matlab
124
126
125
- @slow
127
+ @pytest . mark . slow
126
128
def test_ci_beta0 (self ):
127
129
# All confidence intervals are tested by conducting a hypothesis
128
130
# tests at the confidence interval values since el_test
@@ -136,17 +138,17 @@ def test_ci_beta0(self):
136
138
beta0ci = self .res1 .conf_int_el (0 , method = 'nm' )
137
139
assert_almost_equal (beta0ci , self .res2 .test_ci_beta0 , 6 )
138
140
139
- @slow
141
+ @pytest . mark . slow
140
142
def test_ci_beta1 (self ):
141
143
beta1ci = self .res1 .conf_int_el (1 , method = 'nm' )
142
144
assert_almost_equal (beta1ci , self .res2 .test_ci_beta1 , 6 )
143
145
144
- @slow
146
+ @pytest . mark . slow
145
147
def test_ci_beta2 (self ):
146
148
beta2ci = self .res1 .conf_int_el (2 , lower_bound = .59 , upper_bound = 2.2 , method = 'nm' )
147
149
assert_almost_equal (beta2ci , self .res2 .test_ci_beta2 , 6 )
148
150
149
- @slow
151
+ @pytest . mark . slow
150
152
def test_ci_beta3 (self ):
151
153
beta3ci = self .res1 .conf_int_el (3 , method = 'nm' )
152
154
assert_almost_equal (beta3ci , self .res2 .test_ci_beta3 , 6 )
0 commit comments