Skip to content

TST/BUG: fix incorrectly-passing Exception in test_html #30553

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 3 commits into from
Jan 18, 2020

Conversation

jbrockmendel
Copy link
Member

A raise is indented one indent further than it should be. Fixing this surfaces a failing test that is fixed by decoding bytes before passing it to bs4.

self._setup_build_doc(), features="html5lib", from_encoding=self.encoding
)
bdoc = self._setup_build_doc()
if isinstance(bdoc, bytes) and self.encoding is not None:
Copy link
Contributor

Choose a reason for hiding this comment

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

this is very strange

so this sometimes returns bytes? and str otherwise?

Copy link
Member Author

Choose a reason for hiding this comment

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

i dont know this code particularly well, found this while tracking down except Exception. AFAICT sometimes bs4 wants bytes

@simonjayhawkins simonjayhawkins added Bug IO HTML read_html, to_html, Styler.apply, Styler.applymap Testing pandas testing functions or related to the test suite labels Dec 30, 2019
@jbrockmendel
Copy link
Member Author

gentle ping. not a blocker, but it is a bugfix so it'd be nice to get it in for the RC

@jreback jreback added this to the 1.0.0 milestone Jan 18, 2020
@jreback
Copy link
Contributor

jreback commented Jan 18, 2020

lgtm. can you rebase just in case. ping on green.

@jbrockmendel
Copy link
Member Author

rebased+green

@jreback jreback merged commit d170cc0 into pandas-dev:master Jan 18, 2020
@jreback
Copy link
Contributor

jreback commented Jan 18, 2020

thanks

meeseeksmachine pushed a commit to meeseeksmachine/pandas that referenced this pull request Jan 18, 2020
@jbrockmendel jbrockmendel deleted the tst-raise branch January 18, 2020 17:24
jreback pushed a commit that referenced this pull request Jan 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug IO HTML read_html, to_html, Styler.apply, Styler.applymap Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants