Add pytest suite and CI for Python unit tests - #1543
Conversation
There was a problem hiding this comment.
Sorry @Manik-Khajuria-5, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
There was a problem hiding this comment.
Sorry @Manik-Khajuria-5, you have reached your weekly rate limit of 500000 diff characters.
Please try again later or upgrade to continue using Sourcery
|
@rajnisht7 @vedansh-5 @Jayantparashar10 @tonypzy Please review this PR |
|
@tonypzy I have changed the version Can u please review this PR again |
|
@tonypzy PLease review this PR |
There was a problem hiding this comment.
Pull request overview
This PR introduces a first-class pytest-based Python unit testing layer for Visdom (config + initial smoke test) and wires it into GitHub Actions, alongside updates to contributor/testing documentation.
Changes:
- Add pytest/pytest-cov to Python test dependencies and introduce a root
pyproject.tomlpytest configuration scoped topy/tests/. - Add an initial Python smoke test to validate test discovery and
import visdom. - Add a new GitHub Actions workflow to run pytest on PRs/pushes, and update docs to reflect the new Python testing setup.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
test-requirements.txt |
Adds pytest tooling dependencies for the new Python test suite. |
pyproject.toml |
Adds pytest discovery/configuration (scoped testpaths, pythonpath, markers). |
py/tests/test_smoke.py |
Introduces initial smoke tests for pytest discovery and package import. |
.github/workflows/python-tests.yml |
Adds CI job to run pytest on PRs and branch pushes. |
AGENTS.md |
Updates contributor testing and PR checklist guidance to include pytest. |
.agents/context/testing.md |
Updates internal agent/testing guidance to include pytest usage and CI info. |
REFACTORING.md |
Updates verification plan instructions to use the new pytest configuration. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Description
Wires up pytest as a first-class, config-driven test runner for the Python side
Motivation and Context
The repo had no operational Python test setup no pytest config, pytest was not a declared dependency, and no CI ran Python tests (docs even stated "no Python unit tests"). This adds a proper, CI-gated unit-test layer alongside the existing
Cypress E2E/visual tests so backend logic is covered on every PR.
How Has This Been Tested?
Work in Progress

Types of changes
Checklist:
py/visdom/VERSIONaccord