File tree Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Expand file tree Collapse file tree 3 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ import-check:
1414 uv run python -c " from pymongoarrow.lib import libbson_version"
1515
1616benchmark * args :
17- uv sync --dev --extra test
17+ uv sync --dev --extra test --extra test-polars
1818 uv run asv run -e --python=$(uv run python -c " import sys;print(sys.executable)" ) {{ args}}
1919
2020install :
@@ -23,7 +23,7 @@ install:
2323 uv run pre-commit install
2424
2525test * args :
26- uv sync --extra test
26+ uv sync --extra test --extra test-polars || uv sync --extra test
2727 uv run pytest {{ args}}
2828
2929lint :
Original file line number Diff line number Diff line change @@ -51,7 +51,8 @@ Source = "https://github.com/mongodb-labs/mongo-arrow/tree/main/bindings/python"
5151Tracker = " https://jira.mongodb.org/projects/INTPYTHON/issues"
5252
5353[project .optional-dependencies ]
54- test = [" pytz" , " pytest" , " polars" ]
54+ test = [" pytz" , " pytest" ]
55+ test-polars = [" polars" ]
5556
5657[tool .setuptools ]
5758zip-safe = false
Original file line number Diff line number Diff line change 2222from test .utils import AllowListEventListener
2323
2424import bson
25- import polars as pl
2625import pyarrow as pa
27- from polars . testing import assert_frame_equal
26+ import pytest
2827from pyarrow import int32 , int64
2928from pymongo import DESCENDING , WriteConcern
3029from pymongo .collection import Collection
4039 ObjectIdType ,
4140)
4241
42+ try :
43+ import polars as pl
44+ from polars .testing import assert_frame_equal
45+ except ImportError :
46+ pl = None
47+
48+ if pl is None :
49+ pytest .skip ("Requires polars." , allow_module_level = True )
50+
4351
4452class PolarsTestBase (unittest .TestCase ):
4553 @classmethod
You can’t perform that action at this time.
0 commit comments