Repository navigation
Add tests for Julia metadata handling - #1143
Conversation
|
good |
Luciano Bello (1ucian0)
left a comment
There was a problem hiding this comment.
Thanks!
Tests should mock network interactions, so they do not fail on network issues. Have a look to #1138 as an example.
|
Thanks for the review. I tightened the Julia metadata tests so every Verified locally:
|
Luciano Bello (1ucian0)
left a comment
There was a problem hiding this comment.
why Flux? :)
I think there are more points where mocking can be implemented.
|
Thanks, I pushed a follow-up in Changes:
Verified locally:
|
Summary
Adds JuliaData unit coverage for URL parsing, serialized metadata, JuliaHub URL probing, General registry lookup, download statistics, and update_json orchestration.
Fixes #1106.
Details and comments
The tests mock network calls so they do not depend on JuliaHub, JuliaPackages, the General registry, or Julia download-stat endpoints being reachable during test runs.
Local coverage for
ecosystem/julia.pyincreases to 91% with the new focused tests.Tests run:
uv run --python 3.13 ... pytest tests/models/test_julia.py -quv run --python 3.13 ... pytest tests/models -quv run --python 3.13 ... coverage run --source=ecosystem.julia -m unittest tests.models.test_julia && coverage report -muv run --python 3.13 --with black[jupyter]~=26.3 black --check tests/models/test_julia.pyuv run --python 3.13 ... pylint -rn tests/models/test_julia.pygit diff --check