test : Add shared test fixtures and split py/tests into unit and integration (PyTest - 1) - #1668
Open
Manik-Khajuria-5 wants to merge 7 commits into
Open
test : Add shared test fixtures and split py/tests into unit and integration (PyTest - 1)#1668Manik-Khajuria-5 wants to merge 7 commits into
Manik-Khajuria-5 wants to merge 7 commits into
Conversation
Adds conftest.py, a testutils package, and unit tests for window().
Contributor
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
Contributor
Reviewer's GuideIntroduces shared test infrastructure (root conftest, testutils helpers), splits tests into unit vs integration, and adds direct unit coverage for visdom server utilities while tightening pytest configuration and packaging to keep tests out of the distributed package. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Manik-Khajuria-5
requested review from
Jayantparashar10,
Saksham-Sirohi,
marcoag,
mariobehling,
norbusan,
rajnisht7,
tonypzy and
vedansh-5
July 31, 2026 14:39
Places the two test files dev added into the new layout, and points the new storage-wiring test at env_payload: it called the local _env helper this branch had already replaced, which merged cleanly and then failed.
Open
5 tasks
Contributor
|
Please resolve conflicts |
vedansh-5
approved these changes
Aug 4, 2026
vedansh-5
left a comment
Member
There was a problem hiding this comment.
Please add instructions to run the tests in CONTRIBUTING.md
Manik-Khajuria-5
commented
Aug 5, 2026
Manik-Khajuria-5
left a comment
Member
Author
There was a problem hiding this comment.
@vedansh-5 I have added the instructions for running PyTest in CONTRIBUTING.md as mentioned
test_query.py arrived from dev at the top of py/tests with the redundant test_ prefix. Both conventions are already documented in CONTRIBUTING.md: tests live in unit/ or integration/, and the filename does not repeat the word test. It is a pure parser test with no Application and no I/O, so unit/ is the right home.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds a root
conftest.py(10 shared fixtures) and atestutilspackage (fakes.py,payloads.py,http.py), and moves the existing tests intounit/andintegration/. Addsunit/test_server_utils.pyandunit/test_window_builder.py, registers theunit/integration/slowmarkers, and excludestestsfromfind_packages.Fixes : #1695
Motivation and Context
The same five-method setup block was copy-pasted into six test files and none of them cleaned up their
mkdtemp. With noconftest.py, every new test file reinvented it and the copies had already drifted.window(), the single dispatch point from an/eventspayload to a rendered pane, was co indirectly through HTTP tests; it is now tested directly.A flat
py/testsalso gave no answer to "where does my test go".How Has This Been Tested?
pytest -m "not server"227 passed, 7 subtests, on Python 3.12 and 3.13.black pyclean. No runtime code is touched, soexample/demo.pyidentically to a clean checkout.
Types of changes
Checklist:
py/visdom/VERSIONaccording to Semantic VersioningSummary by Sourcery
Introduce shared testing utilities and fixtures, add focused unit coverage for server utilities and window builder logic, and reorganize the Python test suite into unit and integration layers with explicit markers.
Enhancements:
Documentation:
Tests: