diff --git a/tests/conftest.py b/tests/conftest.py index 6ade3488ec..402347f534 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -7,6 +7,7 @@ import pytest import daft +import daft.context from daft.table import MicroPartition # import all conftest @@ -172,7 +173,10 @@ def assert_df_equals( raise -@pytest.fixture(scope="function", params=[1, None]) +@pytest.fixture( + scope="function", + params=[1, None] if daft.context.get_context().daft_execution_config.enable_native_executor else [None], +) def with_morsel_size(request): morsel_size = request.param with daft.context.execution_config_ctx(default_morsel_size=morsel_size): diff --git a/tests/cookbook/conftest.py b/tests/cookbook/conftest.py index c04f7ab208..f62b74203e 100644 --- a/tests/cookbook/conftest.py +++ b/tests/cookbook/conftest.py @@ -42,7 +42,10 @@ def service_requests_csv_pd_df(): return pd.read_csv(COOKBOOK_DATA_CSV, keep_default_na=False)[COLUMNS] -@pytest.fixture(scope="module", params=[1, 2]) +@pytest.fixture( + scope="module", + params=[1, 2] if daft.context.get_context().daft_execution_config.enable_native_executor is False else [1], +) def repartition_nparts(request): """Adds a `n_repartitions` parameter to test cases which provides the number of partitions that the test case should repartition its dataset into for testing