JuliaPy / PyCall.jl

Package to call Python functions from the Julia language
MIT License
1.45k stars 186 forks source link

Fix unittests on Windows #1016

Closed MilesCranmer closed 1 year ago

MilesCranmer commented 1 year ago

The unittests on master are currently failing on Windows (example), with the following unexpected pass:

 Unexpected Pass
 Expression: begin
    output = read(jlcmd, String)
    (sys_executable, exec_prefix, mod_file) = split(output, "\n")
    newpython == sys_executable
end
 Got correct result, please change to @test if no longer broken.

this PR changes @test_broken to @test as it seems to work now.

Also, this corrects the temporary base directory in the Windows tests to use the one specified by runner.temp, rather than that specified by %TEMP% which is what Base.mktempdir() uses.

(@stevengj this fixes the reason for the failures on #1015)

codecov-commenter commented 1 year ago

Codecov Report

Base: 68.35% // Head: 68.36% // Increases project coverage by +0.01% :tada:

Coverage data is based on head (77115f5) compared to base (9f22684). Patch has no changes to coverable lines.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1016 +/- ## ========================================== + Coverage 68.35% 68.36% +0.01% ========================================== Files 20 20 Lines 2038 2039 +1 ========================================== + Hits 1393 1394 +1 Misses 645 645 ``` | Flag | Coverage Δ | | |---|---|---| | unittests | `68.36% <ø> (+0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#carryforward-flags-in-the-pull-request-comment) to find out more. | [Impacted Files](https://codecov.io/gh/JuliaPy/PyCall.jl/pull/1016?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [src/pyclass.jl](https://codecov.io/gh/JuliaPy/PyCall.jl/pull/1016/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL3B5Y2xhc3Muamw=) | `96.77% <0.00%> (+0.05%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.