Skip to content

DevConf Pune 2026 Test Case Fix#5966

Open
dipayandutta wants to merge 1 commit intofeast-dev:masterfrom
dipayandutta:devconf-pune-2026
Open

DevConf Pune 2026 Test Case Fix#5966
dipayandutta wants to merge 1 commit intofeast-dev:masterfrom
dipayandutta:devconf-pune-2026

Conversation

@dipayandutta
Copy link

@dipayandutta dipayandutta commented Feb 13, 2026

What this PR does / why we need it:

Which issue(s) this PR fixes:

Misc


Open with Devin

@dipayandutta dipayandutta requested a review from a team as a code owner February 13, 2026 19:32
Copy link
Contributor

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

View 4 additional findings in Devin Review.

Open in Devin Review

import tomli as tomllib


ROOT = pathlib.Path(__file__).parent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 ROOT path points to test directory instead of repo root, causing test to always skip

The ROOT variable on line 12 is set to pathlib.Path(__file__).parent, which resolves to sdk/python/tests/unit/. Both parse_pyproject() and parse_setup() look for pyproject.toml and setup.py relative to this ROOT directory. However, neither file exists there — pyproject.toml is at the repo root (/) and setup.py is also at the repo root.

Root Cause and Impact

Since ROOT / "pyproject.toml" resolves to sdk/python/tests/unit/pyproject.toml which doesn't exist, parse_pyproject() returns (set(), {}) on line 33. Similarly, ROOT / "setup.py" resolves to sdk/python/tests/unit/setup.py which also doesn't exist, so parse_setup() returns (set(), {}) on line 87.

In test_dependencies_in_sync() at line 141, the condition if not py_core and not py_optional is always True, so pytest.skip() is always called. The test never actually validates anything — it silently skips every time.

The fix should set ROOT to the actual repository root directory, e.g.:

ROOT = pathlib.Path(__file__).resolve().parents[4]

or find the root by traversing up to where pyproject.toml and setup.py actually exist.

Impact: The test is entirely non-functional. It was intended to verify that dependencies in pyproject.toml and setup.py are in sync, but it never runs the actual comparison logic.

Prompt for agents
In sdk/python/tests/unit/test_dependency_sync.py, line 12 sets ROOT = pathlib.Path(__file__).parent which resolves to sdk/python/tests/unit/. This directory contains neither pyproject.toml nor setup.py. The actual pyproject.toml is at the repository root, and setup.py is also at the repository root. Change ROOT to point to the repository root. For example, since the test file is at sdk/python/tests/unit/test_dependency_sync.py (4 levels deep from the repo root), you could use: ROOT = pathlib.Path(__file__).resolve().parents[4]. Alternatively, you could walk up the directory tree until you find a directory containing both pyproject.toml and setup.py.
Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@shuchu
Copy link
Collaborator

shuchu commented Feb 15, 2026

Hi, do you mind to add more details to the PR like why we need this fix? Thank you in advance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants