Skip to content

Main branch tests are failling #61

Description

@georgesafta

Describe the bug
The tests fail on the main branch

To Reproduce
Steps to reproduce the behavior:

  1. uv sync --all-groups --all-extras
  2. uv run pytest

Expected behavior
All tests pass

Logs

uv run pytest
============================================================================================== test session starts ==============================================================================================
platform linux -- Python 3.12.13, pytest-7.4.4, pluggy-1.6.0
rootdir: /root/projects/python/codeanalyzer-python
configfile: pyproject.toml
testpaths: test
plugins: cov-2.12.1, pspec-0.0.4, asyncio-0.14.0
collected 38 items

test/test_cli.py .F.FFFFFFFFFFF                                                                                                                                                                           [ 36%]
test/test_neo4j_bolt.py ssss                                                                                                                                                                              [ 47%]
test/test_neo4j_schema.py ......                                                                                                                                                                          [ 63%]
test/test_pycg_sharding.py ...                                                                                                                                                                            [ 71%]
test/test_shard_planner.py ...........                                                                                                                                                                    [100%]

============================================================================================ short test summary info ============================================================================================
FAILED test/test_cli.py::::Must be able to run the CLI with symbol table analysis. - AssertionError: CLI command should succeed
FAILED test/test_cli.py::::Must be able to run the CLI with single file analysis using --file-name flag. - AssertionError: CLI command should succeed. Output: [06/28/26 19:21:07] INFO     (Re-)creating virtual environment at
FAILED test/test_cli.py::::Level 1 on decorators_and_hof: symbol table populated, call_graph has Jedi edges. - AssertionError: CLI failed (level 1):
FAILED test/test_cli.py::::Level 2 on decorators_and_hof: call_graph non-empty with PyCG edges.

    Key assertions:
    - At least 20 total edges (observed ~34)
    - PyCG resolves HOF points-to: apply->triple (missed by Jedi's single call-site inference)
    - PyCG finds closure call: log_call.wrapper->greet
     - AssertionError: CLI failed (level 2):
FAILED test/test_cli.py::::Level 1 on class_hierarchy: symbol table has classes and methods. - AssertionError: CLI failed (level 1):
FAILED test/test_cli.py::::Level 2 on class_hierarchy: PyCG resolves virtual dispatch and super() calls.

    Key assertions:
    - At least 30 total edges (observed ~51)
    - PyCG finds virtual dispatch: Animal.describe->PoliceDog.speak
    - PyCG finds super().__init__ chains (present as super edges)
    - __init__ edges present from constructor calls
     - AssertionError: CLI failed (level 2):
FAILED test/test_cli.py::::Level 1 on async_patterns: async functions appear in symbol table. - AssertionError: CLI failed (level 1):
FAILED test/test_cli.py::::Level 2 on async_patterns: PyCG resolves async calls and asyncio stdlib edges.

    Key assertions:
    - At least 15 total edges (observed ~31)
    - PyCG finds asyncio.sleep in async functions (await targets)
    - PyCG finds asyncio.gather in fetch_all
    - Pipeline chain is fully connected (async_main->pipeline->fetch_all->process_url->fetch_data)
     - AssertionError: CLI failed (level 2):
FAILED test/test_cli.py::::Level 1 on Flask 3.0.3: symbol table populated. - AssertionError: CLI failed (level 1):
FAILED test/test_cli.py::::Level 2 on Flask 3.0.3: PyCG substantially augments Jedi's edges.

    PyCG contributes >50% of total edges for a decorator-heavy codebase like Flask
    (observed ~852 PyCG out of ~1450 total edges).
     - AssertionError: CLI failed (level 2):
FAILED test/test_cli.py::::Level 1 on requests 2.31.0: symbol table populated. - AssertionError: CLI failed (level 1):
FAILED test/test_cli.py::::Level 2 on requests 2.31.0: PyCG resolves OO dispatch and session/adapter calls.

    PyCG contributes >50% of total edges for a clean OO codebase like requests
    (observed ~724 PyCG out of ~1121 total edges).
     - AssertionError: CLI failed (level 2):
============================================================================= 12 failed, 22 passed, 4 skipped, 2 warnings in 6.76s ==============================================================================

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions