Skip to content

Commit edf7b4d

Browse files
authored
Merge pull request #682 from bashtage/begin-splitting-tests
TST: Split tests into stable and unstable readers
2 parents 2b86f67 + a5c5a62 commit edf7b4d

25 files changed

+72
-9
lines changed

.travis.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ language: python
33

44
env:
55
global:
6+
- TEST_TYPE="stable and not requires_api_key"
67
# Doctr deploy key for pydata/pandas-datareader
78
- secure: "iGbOAbBSV5y0TKDh2CifRSk6OpLA9GbEEL/hscHFLSDDUCWcdfvYXda3SWJFWyoQ5QUxSigXWd+ukr4u92d7lmB7m3TWj6BAMNuRpatTgnejLNwLvNeYdvLAxPvx39Cq85frd1Rx1beBLn3h/4wm4Ah+dR5W9NH8+x3OuZMH3Eo="
89

@@ -19,10 +20,18 @@ matrix:
1920
env: PANDAS=0.23 NUMPY=1.14
2021
- python: 3.7
2122
env: PANDAS=0.25 NUMPY=1.17 DOCBUILD=true
23+
- python: 3.7
24+
env: PANDAS=0.25 NUMPY=1.17
25+
- python: 3.7
26+
env: TEST_TYPE="not stable" PANDAS=0.25 NUMPY=1.17
2227
# In allow failures
23-
- env: PYTHON=3.7 PANDAS="MASTER"
28+
- python: 3.7
29+
env: PANDAS="MASTER" NUMPY=1.17
2430
allow_failures:
25-
- env: PYTHON=3.7 PANDAS="MASTER"
31+
- python: 3.7
32+
env: PANDAS="MASTER" NUMPY=1.17
33+
- python: 3.7
34+
env: TEST_TYPE="not stable" PANDAS=0.25 NUMPY=1.17
2635

2736
install:
2837
- source ci/pypi-install.sh;
@@ -31,9 +40,10 @@ install:
3140
- python setup.py install
3241

3342
script:
34-
- pytest -s -r xX --cov-config .coveragerc --cov=pandas_datareader --cov-report xml:/tmp/cov-datareader.xml --junitxml=/tmp/datareader.xml
35-
- flake8 --version
36-
- flake8 pandas_datareader
43+
- if [[ -n "${TEST_TYPE+x}" ]]; then export MARKERS="-m ${TEST_TYPE}"; fi
44+
- pytest -s -r xX "${MARKERS}" --cov-config .coveragerc --cov=pandas_datareader --cov-report xml:/tmp/cov-datareader.xml --junitxml=/tmp/datareader.xml
45+
- flake8 --version
46+
- flake8 pandas_datareader
3747

3848
after_script:
3949
- |

ci/pypi-install.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/usr/bin/env bash
22

3-
set +x
43
echo "PyPI install"
54

65
pip install pip --upgrade

pandas_datareader/econdb.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
from pandas_datareader.compat import string_types
2-
31
import requests
42
import pandas as pd
53

pandas_datareader/tests/av/test_av_forex.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
from pandas_datareader import data as web
77

8+
pytestmark = pytest.mark.requires_api_key
9+
810
TEST_API_KEY = os.getenv('ALPHAVANTAGE_API_KEY')
911
TEST_API_KEY = None if not TEST_API_KEY else TEST_API_KEY
1012

pandas_datareader/tests/av/test_av_quotes.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77
import numpy as np
88

9+
pytestmark = pytest.mark.requires_api_key
10+
911
TEST_API_KEY = os.getenv('ALPHAVANTAGE_API_KEY')
1012
TEST_API_KEY = None if not TEST_API_KEY else TEST_API_KEY
1113

pandas_datareader/tests/av/test_av_sector.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55

66
import pandas as pd
77

8+
pytestmark = pytest.mark.requires_api_key
9+
810
TEST_API_KEY = os.getenv('ALPHAVANTAGE_API_KEY')
911
TEST_API_KEY = None if not TEST_API_KEY else TEST_API_KEY
1012

pandas_datareader/tests/av/test_av_time_series.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
from datetime import datetime
1010

11+
pytestmark = pytest.mark.requires_api_key
12+
1113
TEST_API_KEY = os.getenv('ALPHAVANTAGE_API_KEY')
1214
TEST_API_KEY = None if not TEST_API_KEY else TEST_API_KEY
1315

pandas_datareader/tests/io/test_jsdmx.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
from pandas_datareader.compat import PANDAS_0210
1111
from pandas_datareader.io import read_jsdmx
1212

13+
pytestmark = pytest.mark.stable
14+
1315

1416
@pytest.fixture
1517
def dirpath(datapath):

pandas_datareader/tests/io/test_sdmx.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@
99

1010
from pandas_datareader.io.sdmx import read_sdmx, _read_sdmx_dsd
1111

12+
pytestmark = pytest.mark.stable
13+
1214

1315
@pytest.fixture
1416
def dirpath(datapath):

pandas_datareader/tests/test_bankofcanada.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
import pandas_datareader.data as web
66
from pandas_datareader._utils import RemoteDataError
77

8+
pytestmark = pytest.mark.stable
9+
810

911
class TestBankOfCanada(object):
1012

0 commit comments

Comments
 (0)