Skip to content

TTYG-200 Fix unit tests imports#64

Open
pgan002 wants to merge 4 commits into
mainfrom
TTYG-200
Open

TTYG-200 Fix unit tests imports#64
pgan002 wants to merge 4 commits into
mainfrom
TTYG-200

Conversation

@pgan002

@pgan002 pgan002 commented Apr 9, 2026

Copy link
Copy Markdown
Collaborator

Fix imports in Github CI, which caused tests-with-llm/* to start failing there (although they pass locally).

The fix is to explicitly set environment variable PYTHONPATH.

This is needed due to a change in how PYTONPATH is treated, either because of a change in project configuration or the pytest version.

An alternative solution is #75 .

@pgan002 pgan002 changed the title TTYG-200 Test if unit tests fail on the main branch TTYG-200 Fix unit tests imports Apr 9, 2026
@pgan002 pgan002 requested a review from nelly-hateva April 9, 2026 17:03
@nelly-hateva

nelly-hateva commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

@pgan002 Can you provide a link to a build, which is failing? Unlike the other test folder tests-with-llm lacks __init__.py file and hence is not a module. Do you think you should add such?
?

@pgan002

pgan002 commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator Author

A failing test is linked in the Jira ticket, but I added a link in the PR description.

PR adding tests-with-llm/__init__.py: #70

@nelly-hateva

nelly-hateva commented Apr 21, 2026

Copy link
Copy Markdown
Collaborator

I mislead you, adding __init__.py doesn't solve the issue (but please keep it for consistency). Indeed we need to either export PYTHONPATH (as you did) or add in pyproject.toml

[tool.pytest.ini_options]
pythonpath = ["."]

@pgan002

pgan002 commented May 7, 2026

Copy link
Copy Markdown
Collaborator Author

... need to either export PYTHONPATH (as you did) or add in pyproject.toml

Added in #75 as an alternative to this PR. When we merge one of these PRs, we will close the other.

@nelly-hateva

Copy link
Copy Markdown
Collaborator

The tests pass on GitHub as well. Example https://github.com/Ontotext-AD/graphrag-eval/actions/runs/26634186922. Can we close this PR?

@pgan002

pgan002 commented Jun 1, 2026

Copy link
Copy Markdown
Collaborator Author

The tests pass on GitHub as well. Example https://github.com/Ontotext-AD/graphrag-eval/actions/runs/26634186922. Can we close this PR?

What changed to make them pass?

@nelly-hateva

Copy link
Copy Markdown
Collaborator

The tests pass on GitHub as well. Example https://github.com/Ontotext-AD/graphrag-eval/actions/runs/26634186922. Can we close this PR?

What changed to make them pass?

IMO they were passing before, check this one https://github.com/Ontotext-AD/graphrag-eval/actions/runs/25108289498

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