-
Notifications
You must be signed in to change notification settings - Fork 65
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
Strip whitespace before parsing in seval #380
Conversation
Thanks! You could use #379 (comment) as the basis of some tests. |
Okay, I put tests in |
test/utils.jl
Outdated
m = Py(Main) | ||
@test m.seval("1 + 1") === 2 # Basic behavior | ||
@test m.seval("1 + 1\n ") === 2 # Trailing whitespace | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move the test to
Line 189 in 5f56a9b
@testitem "module" begin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also these tests are failing because m.seval(...)
returns a Py
.
There are, under Currently all the Python-side tests do is check that |
My inclination would be to test this on the python side the way it came up in the wild, like this |
Where is |
FWIW this is not a problem in Julia 1.10+, but it's still probably worth fixing here for compatibility with 1.6/1.9. |
I'd prefer the tests back in Julia, since that's where it's defined (it's more of a unit test that way). |
It's called by magic. When you run the |
So I'm assuming the new function I added is also called by magic. Is that test acceptable to you or would you like me to move it back to the Julia side? |
Yes indeed. Back to Julia please - I'd like to keep the Python tests restricted to just the things extra that JuliaCall itself gives you. |
Thanks muchly! |
Fixes #379
I'm not sure how to add tests for this. I don't see tests from the Python side.