Skip to content

Implement inhead-noscript context, add script parameter to parse #230

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

Closed
wants to merge 3 commits into from
Closed

Conversation

neumond
Copy link
Contributor

@neumond neumond commented Apr 21, 2016

48 failing tests now pass. #script-on and #script-off parameters are now considered in testing.

@codecov-io
Copy link

Current coverage is 89.41%

Branch #230 has no coverage reports uploaded yet.

No diff could be generated. No reports for master found.

Powered by Codecov. Updated on successful CI builds.

@landscape-bot
Copy link

Code Health
Repository health decreased by 0.13% when pulling 70151d2 on neumond:master into d999875 on html5lib:master.

@neumond
Copy link
Contributor Author

neumond commented Apr 21, 2016

Looks like something unrelated started to selectively fail or pass depending on version of python.

@@ -22,18 +22,18 @@


def parse(doc, treebuilder="etree", encoding=None,
namespaceHTMLElements=True):
namespaceHTMLElements=True, script=True):
Copy link
Member

Choose a reason for hiding this comment

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

Bikeshed moment: Can we call this scripting?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not a problem. I had doubts naming it.

Copy link
Member

Choose a reason for hiding this comment

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

Also, I'd rather we default to False, given we don't actually implement scripting.

@gsnedders
Copy link
Member

@neumond Thanks, this looks great! I've nothing but a few nits to complain about. :)

I'll try and have a look at why it's failing on Travis soon, FWIW.

(Also: this fixes #10.)

@gsnedders
Copy link
Member

@neumond: one hypothesis about the Travis failures: try recreating the expectation file on Python 2.7 (with optional extras installed).

@landscape-bot
Copy link

Code Health
Repository health decreased by 0.13% when pulling 969d7c6 on neumond:master into d999875 on html5lib:master.

@neumond
Copy link
Contributor Author

neumond commented Apr 23, 2016

@gsnedders You were right, tests with cElementTree were not masked under py3. Thanks for solving pytest-expect py2/py3 issues in advance.

@gsnedders
Copy link
Member

@neumond I'll try and add a warning or error if you're updating the tests with the wrong config, given that's totally undocumented and even I'd forgotten what exactly was needed.

@gsnedders
Copy link
Member

@neumond Oh, I hadn't noticed before, but: can you move the option to HTMLParser.__init__ from _parse? Also, test_treewalker.py needs updated to enable/disable scripting.

@gsnedders
Copy link
Member

Why did I think that a good idea? No, _parse is the right place.

@gsnedders gsnedders mentioned this pull request May 7, 2016
@gsnedders
Copy link
Member

Superseded by #243.

@gsnedders gsnedders closed this May 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants