Skip to content

Commit

Permalink
TST: Mark some tests as slow
Browse files Browse the repository at this point in the history
Mark some tests as slow and skip.
No not skip slow on two builds

Marktests taking > 10s as slow
  • Loading branch information
bashtage committed Aug 26, 2018
1 parent 8c687b0 commit ae63063
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 3 deletions.
2 changes: 2 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ environment:
matrix:
# Pip builds
- PYTHON: C:\Python27
PYTEST_DIRECTIVES:
- PYTHON: C:\Python27-x64
- PYTHON: C:\Python36
- PYTHON: C:\Python36-x64
PYTEST_DIRECTIVES:
# Conda builds
- PY_MAJOR_VER: 2
PYTHON_ARCH: "x86"
Expand Down
5 changes: 3 additions & 2 deletions statsmodels/discrete/tests/test_count_model.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@

from __future__ import division
import os

import numpy as np
from numpy.testing import (assert_, assert_almost_equal,
assert_equal, assert_array_equal, assert_allclose,
assert_array_less)
import pytest

import statsmodels.api as sm
from .results.results_discrete import RandHIE
Expand Down Expand Up @@ -237,6 +237,7 @@ def test_predict_prob(self):
res.predict(), 0.05).T
assert_allclose(pr, pr2, rtol=0.05, atol=0.05)

@pytest.mark.slow
class TestZeroInflatedGeneralizedPoisson(CheckGeneric):
@classmethod
def setup_class(cls):
Expand Down
3 changes: 3 additions & 0 deletions statsmodels/emplike/tests/test_aft.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

import numpy as np
from numpy.testing import assert_almost_equal
import pytest

from statsmodels.datasets import heart
from statsmodels.tools import add_constant
from statsmodels.emplike.aft_el import emplikeAFT
Expand Down Expand Up @@ -37,6 +39,7 @@ def test_beta_vect(self):
assert_almost_equal(self.res1.test_beta([3.5, -.035], [0, 1]),
self.res2.test_joint, decimal=4)

@pytest.mark.slow
def test_betaci(self):
ci = self.res1.ci_beta(1, -.06, 0)
ll = ci[0]
Expand Down
1 change: 1 addition & 0 deletions statsmodels/emplike/tests/test_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def setup_class(cls):
cls.res2 = RegressionResults()


@pytest.mark.slow
class TestRegressionPowell(GenRes):
"""
All confidence intervals are tested by conducting a hypothesis
Expand Down
1 change: 1 addition & 0 deletions statsmodels/regression/tests/test_lme.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,6 +1046,7 @@ def test_summary_col():
assert_equal(str(out), s)


@pytest.mark.slow
def test_random_effects_getters():
# Simulation-based test to make sure that the BLUPs and actual
# random effects line up.
Expand Down
3 changes: 2 additions & 1 deletion statsmodels/stats/tests/test_mediation.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import pandas as pd
from numpy.testing import assert_allclose
import patsy

import pytest

# Compare to mediation R package vignette
df = [['index', 'Estimate', 'Lower CI bound', 'Upper CI bound', 'P-value'],
Expand Down Expand Up @@ -118,6 +118,7 @@ def test_framing_example_moderator():
med_rslt = med.fit(method='parametric', n_rep=100)


@pytest.mark.slow
def test_framing_example_formula():

cur_dir = os.path.dirname(os.path.abspath(__file__))
Expand Down
2 changes: 2 additions & 0 deletions statsmodels/tsa/statespace/tests/test_sarimax.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import numpy as np
import pandas as pd
import pytest
import os

import warnings
Expand Down Expand Up @@ -2329,6 +2330,7 @@ def check_concentrated_scale(filter_univariate=False):
assert_allclose(actual, desired, atol=atol)


@pytest.mark.slow
def test_concentrated_scale():
check_concentrated_scale(filter_univariate=False)
check_concentrated_scale(filter_univariate=True)
2 changes: 2 additions & 0 deletions statsmodels/tsa/statespace/tests/test_structural.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import numpy as np
import pandas as pd
import pytest
import os

import warnings
Expand Down Expand Up @@ -195,6 +196,7 @@ def test_rtrend_ar1(close_figures):
run_ucm('rtrend_ar1')


@pytest.mark.slow
def test_lltrend_cycle_seasonal_reg_ar1(close_figures):
run_ucm('lltrend_cycle_seasonal_reg_ar1')

Expand Down

0 comments on commit ae63063

Please sign in to comment.