fix: Test collection errors for parquet, backend_capability, issue_160 (#476)#486
Merged
eddiethedean merged 1 commit intov4.0.0from Feb 12, 2026
Merged
Conversation
…60 tests (#476) - test_parquet_format_table_append: remove top-level PolarsStorageManager import; use pytest.importorskip('polars') and local import in the test that needs it so collection succeeds when polars is not installed. - test_backend_capability_model: add pytest.importorskip('polars') before PolarsMaterializer import so module is skipped when polars missing. - test_issue_160_manual_cache_manipulation, test_issue_160_nested_operations: add pytest.importorskip('polars') before importing polars so collection succeeds when polars is not installed. - v4_robin_skip_list: add the three Polars-only test modules so they are skipped when SPARKLESS_TEST_BACKEND=robin. Co-authored-by: Cursor <cursoragent@cursor.com>
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.
Summary
Fixes #476: pytest collection no longer fails for the four modules when running with Robin backend (or when Polars is not installed).
Changes
PolarsStorageManagerimport. The test that uses it (test_storage_manager_detached_write_visible_to_session) now callspytest.importorskip("polars")and importsPolarsStorageManagerlocally, so the module collects successfully when Polars is missing.pytest.importorskip("polars")before importingPolarsMaterializer, so the module is skipped at collection when Polars is not installed (no ImportError).pytest.importorskip("polars")beforeimport polars as pl, so collection succeeds when Polars is not installed.test_backend_capability_model.py,test_issue_160_manual_cache_manipulation.py,test_issue_160_nested_operations.py) so they are skipped whenSPARKLESS_TEST_BACKEND=robin.Verification
With
SPARKLESS_TEST_BACKEND=robinand no Polars installed,pytest tests/parity/dataframe/test_parquet_format_table_append.py tests/test_backend_capability_model.py tests/test_issue_160_manual_cache_manipulation.py tests/test_issue_160_nested_operations.py --collect-onlycompletes with 0 collection errors (parquet tests collected; other modules skipped via importorskip).Made with Cursor