From 2d4dd5127d53aac37fa498adac4c8d6d45e79544 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sun, 29 Dec 2019 18:31:34 +0000 Subject: [PATCH 1/7] XFAIL Tests --- pandas/tests/io/test_html.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index bc26615d1aad5..cd39445a50ba3 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -382,6 +382,8 @@ def test_thousands_macau_stats(self, datapath): assert not any(s.isna().any() for _, s in df.items()) + # https://github.com/pandas-dev/pandas/issues/29622 + @pytest.mark.xfail(reason='fails for bs4 version >= 4.8.0', strict=False) @pytest.mark.slow def test_thousands_macau_index_col(self, datapath): all_non_nan_table_index = -2 From 2768e2c03d5b76e864616e075caf0f342ff2c579 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sun, 29 Dec 2019 22:37:29 +0000 Subject: [PATCH 2/7] XFAIL Tests --- pandas/tests/io/test_html.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index cd39445a50ba3..ffc7585492f8d 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -382,10 +382,12 @@ def test_thousands_macau_stats(self, datapath): assert not any(s.isna().any() for _, s in df.items()) - # https://github.com/pandas-dev/pandas/issues/29622 - @pytest.mark.xfail(reason='fails for bs4 version >= 4.8.0', strict=False) @pytest.mark.slow def test_thousands_macau_index_col(self, datapath): + # https://github.com/pandas-dev/pandas/issues/29622 + if self.read_html.keywords.get("flavor") == "bs4": + pytest.xfail("fails for bs4 version >= 4.8.0") + all_non_nan_table_index = -2 macau_data = datapath("io", "data", "html", "macau.html") dfs = self.read_html(macau_data, index_col=0, header=0) From 8acd4f03860e68b5e4a3ee552270b437e718917f Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Sun, 29 Dec 2019 23:06:44 +0000 Subject: [PATCH 3/7] Update as per brock suggestion --- pandas/tests/io/test_html.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index ffc7585492f8d..cf20f1f7af3d8 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -383,10 +383,11 @@ def test_thousands_macau_stats(self, datapath): assert not any(s.isna().any() for _, s in df.items()) @pytest.mark.slow - def test_thousands_macau_index_col(self, datapath): + def test_thousands_macau_index_col(self, datapath, request): # https://github.com/pandas-dev/pandas/issues/29622 if self.read_html.keywords.get("flavor") == "bs4": - pytest.xfail("fails for bs4 version >= 4.8.0") + reason = "fails for bs4 version >= 4.8.0" + request.node.add_marker(pytest.mark.xfail(reason=reason)) all_non_nan_table_index = -2 macau_data = datapath("io", "data", "html", "macau.html") From 9cab2ad21c59a64625020183c20bff5155872cc0 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Mon, 30 Dec 2019 18:28:47 +0000 Subject: [PATCH 4/7] unpin beautiful soup version --- ci/deps/azure-36-locale_slow.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/deps/azure-36-locale_slow.yaml b/ci/deps/azure-36-locale_slow.yaml index 2bb2b00319382..1d9257fc3e177 100644 --- a/ci/deps/azure-36-locale_slow.yaml +++ b/ci/deps/azure-36-locale_slow.yaml @@ -13,7 +13,7 @@ dependencies: - pytest-azurepipelines # pandas dependencies - - beautifulsoup4==4.6.0 + - beautifulsoup4 - bottleneck=1.2.* - lxml - matplotlib=2.2.2 From 574723f9a67f6c93efa3f230db37dd3467d8dbac Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Tue, 31 Dec 2019 12:07:04 +0000 Subject: [PATCH 5/7] Dont xfail for bs4 < 4.8.0 --- ci/deps/azure-36-locale_slow.yaml | 2 +- pandas/tests/io/test_html.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/ci/deps/azure-36-locale_slow.yaml b/ci/deps/azure-36-locale_slow.yaml index 1d9257fc3e177..48ac50c001715 100644 --- a/ci/deps/azure-36-locale_slow.yaml +++ b/ci/deps/azure-36-locale_slow.yaml @@ -13,7 +13,7 @@ dependencies: - pytest-azurepipelines # pandas dependencies - - beautifulsoup4 + - beautifulsoup4=4.6.0 - bottleneck=1.2.* - lxml - matplotlib=2.2.2 diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index cf20f1f7af3d8..e58dc85ad3ce1 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -385,7 +385,10 @@ def test_thousands_macau_stats(self, datapath): @pytest.mark.slow def test_thousands_macau_index_col(self, datapath, request): # https://github.com/pandas-dev/pandas/issues/29622 - if self.read_html.keywords.get("flavor") == "bs4": + # This tests fails for bs4 >= 4.8.0 - so handle xfail accordingly + if self.read_html.keywords.get("flavor") == "bs4" and td.safe_import( + "bs4", "4.8.0" + ): reason = "fails for bs4 version >= 4.8.0" request.node.add_marker(pytest.mark.xfail(reason=reason)) From 804560f6a3d212f85265de82f0b537f3ca5498f1 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Tue, 31 Dec 2019 12:09:50 +0000 Subject: [PATCH 6/7] Remove slow tests from allowed failures --- .travis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0c7740295b637..25b7cd02a6599 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,17 +48,12 @@ matrix: - mysql - postgresql - # In allow_failures - env: - JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" SQL="1" services: - mysql - postgresql - allow_failures: - - env: - - JOB="3.6, slow" ENV_FILE="ci/deps/travis-36-slow.yaml" PATTERN="slow" SQL="1" - before_install: - echo "before_install" # set non-blocking IO on travis From 7faa5ef864f54f8b70213e9111186698aa65f393 Mon Sep 17 00:00:00 2001 From: alimcmaster1 Date: Tue, 31 Dec 2019 13:58:24 +0000 Subject: [PATCH 7/7] black pandas --- pandas/tests/io/test_html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/tests/io/test_html.py b/pandas/tests/io/test_html.py index e58dc85ad3ce1..2bb412cf6eab5 100644 --- a/pandas/tests/io/test_html.py +++ b/pandas/tests/io/test_html.py @@ -387,7 +387,7 @@ def test_thousands_macau_index_col(self, datapath, request): # https://github.com/pandas-dev/pandas/issues/29622 # This tests fails for bs4 >= 4.8.0 - so handle xfail accordingly if self.read_html.keywords.get("flavor") == "bs4" and td.safe_import( - "bs4", "4.8.0" + "bs4", "4.8.0" ): reason = "fails for bs4 version >= 4.8.0" request.node.add_marker(pytest.mark.xfail(reason=reason))