- Julia tests: Run from the project root with
julia --project -e 'using Pkg; Pkg.test()'. Expect a warning about the General registry being unreachable in locked-down environments; the suite still finishes (PyCall tests are marked broken/Skipped). - Python tests:
- Copy
pysrc/juliacall/juliapkg-dev.jsontopysrc/juliacall/juliapkg.jsonbefore running (do not commit this copy). - Execute with
uv run pytest -s --nbval ./pytest(add--cov=pysrcwhen coverage is needed). - Sometimes
juliapkgrequires Julia 1.10–1.11;juliaupalready provides 1.11.7 in this environment.
- Copy
The majority of tests live in the Julia package; Python tests cover functionality that cannot be exercised from Julia (e.g., JuliaCall-specific behavior). Run both suites—typically Julia first—in whichever order makes sense.
- In restricted sandboxes, both suites need approval to write to the shared caches (
~/.juliaand~/.cache/uv). pysrc/juliacall/juliapkg.jsonis tracked; restore its original contents after using the development copy for Python tests.
- When testing an older Julia version, a local manifest generated by newer Julia can fail on stdlib dependencies. Use a temporary environment with
Pkg.develop(path=pwd()); Pkg.test("PythonCall")to resolve dependencies for that Julia version. - CI caches Conda.jl build configuration without its root environment. Rebuild Conda after cache restore before PyCall is built; otherwise Julia 1.10 can fail before tests with "Path to conda environment is not valid".
- When you discover environment quirks, false assumptions, process fixes, or any other generally useful info, update this AGENTS.md so future coding agents have the information.