-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Consolidate Solara Visualization test coverage #2993
Copy link
Copy link
Closed
Labels
testingRelease notes labelRelease notes label
Description
Problem
Currently, we have two test files for Solara visualization:
test_solara_viz.py- Old file kept for backwards compatibility with legacy backendstest_solara_viz_updated.py- New file with updated architecture
The recent PR #2985 revealed a gap in test coverage: Altair's AgentPortrayalStyle support was only tested in the legacy file, not in the updated one. This means the new test file doesn't have comprehensive coverage of all behaviors.
Proposed Solution
We should have:
-
One primary test file (
test_solara_viz.py) that:- Tests all current best practices using the new architecture
- Has full coverage of all visualization components and their features
- Uses
AgentPortrayalStyle,SpaceRenderer, and other modern APIs - Includes comprehensive tests for both Matplotlib and Altair backends
-
One backwards compatibility test file (e.g.,
test_solara_viz_legacy.pyortest_solara_viz_backwards_compat.py) that:- Tests deprecated dict-based portrayals still work
- Tests legacy component APIs that are maintained for compatibility
- Can be clearly identified as testing legacy behavior
- May eventually be removed when backwards compatibility is dropped
Current Issues
- The "updated" file is actually missing Altair-specific tests that exist in the "old" file
- Having two files with overlapping but incomplete coverage is confusing
- It's unclear which file should be considered the source of truth
- New contributors won't know which file to update when adding features
Follow-up from #2985. @Sahil-Chhoker, does this cover it?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
testingRelease notes labelRelease notes label