Repository navigation
Description
Pre-flight checks
- I have checked the Troubleshooting section in the README
What happened?
Actual: Following CONTRIBUTING.md on a fresh clone of v8 (uv sync, then uv run pytest tests/), 35 tests fail. They depend on optional extras (r, erlang, solidity, vbnet, ollama, sql) that a default uv sync doesn't install, and they have no guard for that, so they fail with assertion errors (e.g. an empty graph because the grammar is missing) instead of skipping.
Expected: Tests that need an optional extra should skip cleanly when it isn't installed, the same way other optional-dependency tests already do with pytest.importorskip (e.g. tests/test_cpp_nested_and_cli.py, tests/test_docx_to_markdown.py, and the tree_sitter_sql cases in tests/test_extract.py). A contributor following CONTRIBUTING.md should get a green run.
CI doesn't catch this because it runs uv sync --all-extras. With all extras installed, all 35 pass.
Steps to reproduce
1. Clone the repo and check out `v8` (tested at f765dcb, release 0.9.79)
2. `uv sync --frozen` (default install, no extras, as CONTRIBUTING.md suggests)
3. `uv run --frozen pytest tests/ -q`
4. Result: `35 failed, 6533 passed, 106 skipped`
5. `uv sync --all-extras --frozen` and rerun: the 35 passError output or graph output
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================== short test summary info ============================
FAILED tests/test_erlang_extractor.py::test_erlang_functions_resolve_by_name_and_arity
FAILED tests/test_erlang_extractor.py::test_erlang_attributes_includes_and_remote_calls
FAILED tests/test_erlang_extractor.py::test_erlang_fixture_uses_normal_extract_path
FAILED tests/test_erlang_extractor.py::test_erlang_local_fun_reference_links_to_the_function
FAILED tests/test_erlang_extractor.py::test_erlang_direct_call_stays_a_call_not_indirect
FAILED tests/test_erlang_extractor.py::test_erlang_call_inside_anonymous_fun_still_captured
FAILED tests/test_erlang_extractor.py::test_erlang_malformed_tail_comments_and_strings_do_not_create_phantoms
FAILED tests/test_ollama_retry_cap.py::test_ollama_defaults_to_zero_sdk_retries
FAILED tests/test_ollama_retry_cap.py::test_ollama_honors_explicit_max_retries
FAILED tests/test_ollama_retry_cap.py::test_cloud_backend_keeps_default_retries
FAILED tests/test_ollama_retry_cap.py::test_api_timeout_is_passed_to_client
FAILED tests/test_r_extractor.py::test_r_functions_and_calls_are_extracted - ...
FAILED tests/test_r_extractor.py::test_r_assignments_sources_and_classes_are_extracted
FAILED tests/test_r_extractor.py::test_r_fixture_uses_normal_extract_path - A...
FAILED tests/test_r_extractor.py::test_r_malformed_tail_comments_and_strings_do_not_create_phantoms
FAILED tests/test_r_extractor.py::test_r_namespaced_r6class_extracts_the_class_body
FAILED tests/test_r_extractor.py::test_r_namespaced_setrefclass_is_recognised
FAILED tests/test_r_extractor.py::test_r6_self_and_private_method_calls_resolve
FAILED tests/test_r_extractor.py::test_r_symbol_only_bindings_have_distinct_ids
FAILED tests/test_r_extractor.py::test_r_symbol_only_function_with_external_call_terminates
FAILED tests/test_r_extractor.py::test_r_operator_fallback_does_not_collide_with_ordinary_binding
FAILED tests/test_r_extractor.py::test_r_operator_scope_keeps_nested_binding_identity
FAILED tests/test_solidity_extractor.py::test_solidity_contract_members_and_calls_are_extracted
FAILED tests/test_solidity_extractor.py::test_solidity_free_functions_and_their_calls_are_extracted
FAILED tests/test_solidity_extractor.py::test_solidity_types_imports_inheritance_overloads_and_modifiers
FAILED tests/test_solidity_extractor.py::test_solidity_enum_values_emit_case_of_not_contains
FAILED tests/test_solidity_extractor.py::test_solidity_fixture_uses_normal_extract_path
FAILED tests/test_solidity_extractor.py::test_solidity_malformed_tail_comments_and_strings_do_not_create_phantoms
FAILED tests/test_source_file_encoding.py::test_utf16_files_from_windows_tools_are_extracted[schema.sql-CREATE TABLE Orders (id INT);\nCREATE VIEW RecentOrders AS SELECT id FROM Orders;\n-want0]
FAILED tests/test_vbnet_extractor.py::test_vbnet_class_methods_and_case_insensitive_calls
FAILED tests/test_vbnet_extractor.py::test_vbnet_module_qualified_call_resolves_to_the_module_method
FAILED tests/test_vbnet_extractor.py::test_vbnet_types_members_relationships_and_partial_calls
FAILED tests/test_vbnet_extractor.py::test_vbnet_fixture_uses_normal_extract_path
FAILED tests/test_vbnet_extractor.py::test_vbnet_malformed_tail_comments_and_strings_do_not_create_phantoms
FAILED tests/test_vbnet_extractor.py::test_vbnet_enum_members_emit_case_of_not_contains
35 failed, 6533 passed, 106 skipped, 1343 warnings in 165.35s (0:02:45)
Graphify version
No response
Operating System
macOS
Python Version
3.13
Installation Method
uv tool install (recommended)
Additional Environment Details
No response
Additional context
Proposed fix (happy to send a PR):
- Add
pytest.importorskip(...)guards to the affected tests, matching the existing pattern in the suite. Module-level for the extractor files, per-case for the single SQL encoding case. - Update the Development Setup section of CONTRIBUTING.md to recommend
uv sync --all-extrasfor a full local run, matching CI.
This keeps the tests fully exercised in CI while letting a default install produce a clean pass/skip result.
Activity
github-actions commentedon Oct 7, 2026
Thanks for opening this issue, @yatharth1706. A maintainer will take a look soon.
If you would like to discuss it in real time, come say hi on our Discord server. For longer-form questions and ideas there is also GitHub Discussions.
To help us triage, please make sure the report includes what you expected, what actually happened, and the steps (and a small sample) to reproduce it.
test: skip optional-extra tests when the extra is not installed (#4190)
Merge upstream/v8 (v0.9.80) into chore/sync-upstream-0980
Merge upstream/v8 (v0.9.80) into consolidated/php-support-1682
safishamsi commentedon Oct 9, 2026
Fixed by #4193 (thanks @yatharth1706), shipped in v0.9.80. Closing as resolved.