Skip to content

[Local Dev] Fix pytest config#9670

Merged
liranbg merged 1 commit into
mlrun:developmentfrom
daanvdk-mck:fix-pytest-setup
May 8, 2026
Merged

[Local Dev] Fix pytest config#9670
liranbg merged 1 commit into
mlrun:developmentfrom
daanvdk-mck:fix-pytest-setup

Conversation

@daanvdk-mck
Copy link
Copy Markdown
Contributor

@daanvdk-mck daanvdk-mck commented May 8, 2026

📝 Description

Fixed a small bug in the pytest config that caused import errors when running the pytest cli directly.


🛠️ Changes Made

Updated the pythonpath setting of the pytest config to include the root directory.


✅ Checklist

  • I updated the documentation (if applicable)
  • I have tested the changes in this PR
  • I confirmed whether my changes are covered by system tests
    • If yes, I ran all relevant system tests and ensured they passed before submitting this PR
    • I updated existing system tests and/or added new ones if needed to cover my changes
  • If I introduced a deprecation:
  • Please run Smoke-tests workflow, providing it the PR number as input (upon success, the workflow run will add label "Smoke tests: Pass" to the RP)

🧪 Testing


🔗 References

  • Ticket link:
  • Design docs links:
  • External links:

🚨 Breaking Changes?

  • Yes (explain below)
  • No

🔍️ Additional Notes

Basically the setting to include ./server/py when running from the root, excluded the root itself which is also needed because some test files import from tests.*. This issue was not as apparent because if you run pytest through python (python -m pytest) the root is already part of the pythonpath through the python invocation and wont get removed. This PR thus leaves the correct behaviour of python -m pytest intact while bringing pytest inline with it.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 8, 2026

📊 Diff Coverage Report

📂 Click to view full coverage details

Diff Coverage

Diff: origin/development...HEAD, staged and unstaged changes

No lines with coverage information in this diff.

@daanvdk-mck daanvdk-mck marked this pull request as ready for review May 8, 2026 09:54
@daanvdk-mck daanvdk-mck requested a review from liranbg as a code owner May 8, 2026 09:54
@liranbg liranbg merged commit 4f99312 into mlrun:development May 8, 2026
14 checks passed
@daanvdk-mck daanvdk-mck deleted the fix-pytest-setup branch May 11, 2026 07:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants