diff --git a/ci/requirements-py27.yml b/ci/requirements-py27.yml index 2ede99444d..dd93786152 100644 --- a/ci/requirements-py27.yml +++ b/ci/requirements-py27.yml @@ -1,7 +1,7 @@ name: test_env channels: + - conda-forge - defaults - - http://conda.anaconda.org/conda-forge dependencies: - python=2.7 - numpy @@ -16,3 +16,4 @@ dependencies: - nose - pip: - coveralls + - pytest-timeout diff --git a/ci/requirements-py34.yml b/ci/requirements-py34.yml index 42f1daddbe..91ba94f11e 100644 --- a/ci/requirements-py34.yml +++ b/ci/requirements-py34.yml @@ -1,7 +1,7 @@ name: test_env channels: - - defaults - conda-forge + - defaults dependencies: - python=3.4 - numpy @@ -16,3 +16,4 @@ dependencies: - nose - pip: - coveralls + - pytest-timeout diff --git a/ci/requirements-py35.yml b/ci/requirements-py35.yml index dbde37fe93..8f8c648517 100644 --- a/ci/requirements-py35.yml +++ b/ci/requirements-py35.yml @@ -1,7 +1,7 @@ name: test_env channels: - - defaults - conda-forge + - defaults dependencies: - python=3.5 - numpy @@ -16,3 +16,4 @@ dependencies: - nose - pip: - coveralls + - pytest-timeout diff --git a/docs/sphinx/source/whatsnew/v0.4.4.txt b/docs/sphinx/source/whatsnew/v0.4.4.txt index 48ff7da142..b881a7e8b9 100644 --- a/docs/sphinx/source/whatsnew/v0.4.4.txt +++ b/docs/sphinx/source/whatsnew/v0.4.4.txt @@ -15,6 +15,15 @@ Documentation * Fixes broken Classes link in the v0.3.0 documentation. +Bug fixes +~~~~~~~~~ + +* Resolved several issues with the forecast module tests. Library import + errors were resolved by prioritizing the conda-forge channel over the + default channel. Stalled ci runs were resolved by adding a timeout to + the HRRR_ESRL test. (:issue:`293`) + + Contributors ~~~~~~~~~~~~ diff --git a/pvlib/test/conftest.py b/pvlib/test/conftest.py index 1167900f21..d85606826e 100644 --- a/pvlib/test/conftest.py +++ b/pvlib/test/conftest.py @@ -7,6 +7,9 @@ import pytest +skip_windows = pytest.mark.skipif('win' in sys.platform, + reason='does not run on windows') + try: import scipy has_scipy = True diff --git a/pvlib/test/test_forecast.py b/pvlib/test/test_forecast.py index 0863e929ec..44575f0856 100644 --- a/pvlib/test/test_forecast.py +++ b/pvlib/test/test_forecast.py @@ -9,7 +9,7 @@ import pytest from numpy.testing import assert_allclose -from conftest import requires_siphon, has_siphon +from conftest import requires_siphon, has_siphon, skip_windows pytestmark = pytest.mark.skipif(not has_siphon, reason='requires siphon') @@ -30,7 +30,10 @@ _end = _start + pd.Timedelta(days=1) _modelclasses = [ GFS, NAM, HRRR, NDFD, RAP, - pytest.mark.xfail(HRRR_ESRL, reason="HRRR_ESRL is unreliable")] + skip_windows( + pytest.mark.xfail( + pytest.mark.timeout(HRRR_ESRL, timeout=60), + reason="HRRR_ESRL is unreliable"))] _working_models = [] _variables = ['temp_air', 'wind_speed', 'total_clouds', 'low_clouds', 'mid_clouds', 'high_clouds', 'dni', 'dhi', 'ghi',]