-
Notifications
You must be signed in to change notification settings - Fork 25
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
use AbstractTrees for traversals #29
Conversation
Current coverage is 75.20% (diff: 100%)@@ master #29 diff @@
==========================================
Files 5 6 +1
Lines 157 125 -32
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
- Hits 127 94 -33
- Misses 30 31 +1
Partials 0 0
|
The tests should probably be updated to the new API, since they show deprecation warnings currently. I ask mainly because looking at the tests is the best way to learn how to use the API. |
definitely an oversight on my part, I will make an issue for this. I'm not sure when I will get around to it though :/ PRs welcome if you have the time :) |
ahh wait, I remember why I left them now. I wanted to remove them since they more or less are just testing code in AbstractTrees.jl, but I also wanted to make sure that code using the now deprecated iterators from this package wouldn't break. Maybe the right thing to do here is a comment to that test file indicating that these are deprecated? Alternatively, we could just drop them when fixing the inevitable breakage when Julia 0.6 is released (if that hasn't happened yet, I haven't been paying too much attention I'll admit 😬) |
OK, that makes sense. The reason I was looking into this is that the test code does not use |
julia> using Gumbo
julia> n=parsehtml("<body><address>This address...</address></body>");
julia> for c in preorder(n.root)
println(c)
end
<HTML><head></head><body><address>This address...</address></body></HTML>
<head></head>
<body><address>This address...</address></body>
<address>This address...</address>
This address...
julia> using Gumbo
julia> n=parsehtml("<body><address>This address...</address></body>");
julia> for c in preorder(n.root)
println(c)
end
<HTML><head></head><body><address>This address...</address></body></HTML> [Ignore the above, this was an artifact of my local environment. The existing package tests do test for this. Sorry for the noise. ] |
no worries! |
And drop 0.4 support.