Skip to content

Commit 6322b8f

Browse files
alimcmaster1jbrockmendel
authored andcommitted
TST: XFAIL Travis read_html tests (#30544)
* XFAIL Tests * XFAIL Tests * Update as per brock suggestion * unpin beautiful soup version * Dont xfail for bs4 < 4.8.0 * Remove slow tests from allowed failures * black pandas
1 parent ee42275 commit 6322b8f

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

.travis.yml

-5
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,12 @@ matrix:
4848
- mysql
4949
- postgresql
5050

51-
# In allow_failures
5251
- env:
5352
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" SQL="1"
5453
services:
5554
- mysql
5655
- postgresql
5756

58-
allow_failures:
59-
- env:
60-
- JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" SQL="1"
61-
6257
before_install:
6358
- echo "before_install"
6459
# set non-blocking IO on travis

ci/deps/azure-36-locale_slow.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies:
1313
- pytest-azurepipelines
1414

1515
# pandas dependencies
16-
- beautifulsoup4==4.6.0
16+
- beautifulsoup4=4.6.0
1717
- bottleneck=1.2.*
1818
- lxml
1919
- matplotlib=2.2.2

pandas/tests/io/test_html.py

+9-1
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,15 @@ def test_thousands_macau_stats(self, datapath):
383383
assert not any(s.isna().any() for _, s in df.items())
384384

385385
@pytest.mark.slow
386-
def test_thousands_macau_index_col(self, datapath):
386+
def test_thousands_macau_index_col(self, datapath, request):
387+
# https://github.com/pandas-dev/pandas/issues/29622
388+
# This tests fails for bs4 >= 4.8.0 - so handle xfail accordingly
389+
if self.read_html.keywords.get("flavor") == "bs4" and td.safe_import(
390+
"bs4", "4.8.0"
391+
):
392+
reason = "fails for bs4 version >= 4.8.0"
393+
request.node.add_marker(pytest.mark.xfail(reason=reason))
394+
387395
all_non_nan_table_index = -2
388396
macau_data = datapath("io", "data", "html", "macau.html")
389397
dfs = self.read_html(macau_data, index_col=0, header=0)

0 commit comments

Comments
 (0)