Skip to content

CI: Revive Banklist Tests #42889

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
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Fixes from pre-commit [automated commit]
  • Loading branch information
lithomas1 committed Sep 1, 2021
commit d80f47db1d62417ff4d49be7be488840a18f2780
20 changes: 14 additions & 6 deletions pandas/tests/io/test_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,28 +136,36 @@ def test_to_html_compat(self):

@tm.network
def test_banklist_url_positional_match(self):
url = "http://www.fdic.gov/resources/resolutions/bank-failures/failed-bank-list/index.html" # noqa E501
url = "http://www.fdic.gov/resources/resolutions/bank-failures/failed-bank-list/index.html" # noqa E501
# Passing match argument as positional should cause a FutureWarning.
with tm.assert_produces_warning(FutureWarning):
df1 = self.read_html(
# lxml cannot find attrs leave out for now
url, "First Federal Bank of Florida", # attrs={"class": "dataTable"}
url,
"First Federal Bank of Florida", # attrs={"class": "dataTable"}
)
with tm.assert_produces_warning(FutureWarning):
# lxml cannot find attrs leave out for now
df2 = self.read_html(url, "Metcalf Bank",) #attrs={"class": "dataTable"})
df2 = self.read_html(
url,
"Metcalf Bank",
) # attrs={"class": "dataTable"})

assert_framelist_equal(df1, df2)

@tm.network
def test_banklist_url(self):
url = "http://www.fdic.gov/resources/resolutions/bank-failures/failed-bank-list/index.html" # noqa E501
url = "http://www.fdic.gov/resources/resolutions/bank-failures/failed-bank-list/index.html" # noqa E501
df1 = self.read_html(
# lxml cannot find attrs leave out for now
url, match="First Federal Bank of Florida", # attrs={"class": "dataTable"}
url,
match="First Federal Bank of Florida", # attrs={"class": "dataTable"}
)
# lxml cannot find attrs leave out for now
df2 = self.read_html(url, match="Metcalf Bank",) #attrs={"class": "dataTable"})
df2 = self.read_html(
url,
match="Metcalf Bank",
) # attrs={"class": "dataTable"})

assert_framelist_equal(df1, df2)

Expand Down