Skip to content

TST: XFAIL Travis read_html tests #30544

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 31, 2019
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ci/deps/azure-36-locale_slow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ dependencies:
- pytest-azurepipelines

# pandas dependencies
- beautifulsoup4==4.6.0
- beautifulsoup4=4.6.0
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be single =

- bottleneck=1.2.*
- lxml
- matplotlib=2.2.2
Expand Down
10 changes: 9 additions & 1 deletion pandas/tests/io/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,15 @@ 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
# 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))

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you change this from the decorator in response to my comment? if so, thats not what i meant. the decorator is preferred, but without the strict=False

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah just want to xfail one particular parameterization - bs4 and the parameterization is at class scope - agree decorator is usually preferred.

Updated now - think its easiest to do this in the function itself for this case - unless you know a more elegant way?

Copy link
Member Author

@alimcmaster1 alimcmaster1 Dec 29, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just seen I can potentially go for the same approach as you did here https://github.com/pandas-dev/pandas/pull/30521/files? Will update unless you think otherwise?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the test doesnt use the class fixture(s), could it just be moved out of the class?

If not then the approach in 30521 would be my preference, yes.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some class fixtures are used so easier to keep where is. Updated - thanks!

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)
Expand Down