Skip to content

Commit

Permalink
Disable tests when not in micropartitions mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Jay Chia committed Dec 5, 2023
1 parent 52cbaba commit 5285b12
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/io/test_merge_scan_tasks.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

import contextlib
import os

import pytest

Expand Down Expand Up @@ -37,6 +38,7 @@ def csv_files(tmpdir):
return tmpdir


@pytest.mark.skipif(os.getenv("DAFT_MICROPARTITIONS", "1") == "0", reason="Test can only run on micropartitions")
def test_merge_scan_task_exceed_max(csv_files):
with override_merge_scan_tasks_configs(0, 0):
df = daft.read_csv(str(csv_files))
Expand All @@ -45,6 +47,7 @@ def test_merge_scan_task_exceed_max(csv_files):
), "Should have 3 partitions since all merges are more than the maximum (>0 bytes)"


@pytest.mark.skipif(os.getenv("DAFT_MICROPARTITIONS", "1") == "0", reason="Test can only run on micropartitions")
def test_merge_scan_task_below_max(csv_files):
with override_merge_scan_tasks_configs(1, 20):
df = daft.read_csv(str(csv_files))
Expand All @@ -53,6 +56,7 @@ def test_merge_scan_task_below_max(csv_files):
), "Should have 2 partitions [(CSV1, CSV2), (CSV3)] since the second merge is too large (>20 bytes)"


@pytest.mark.skipif(os.getenv("DAFT_MICROPARTITIONS", "1") == "0", reason="Test can only run on micropartitions")
def test_merge_scan_task_above_min(csv_files):
with override_merge_scan_tasks_configs(0, 40):
df = daft.read_csv(str(csv_files))
Expand All @@ -61,6 +65,7 @@ def test_merge_scan_task_above_min(csv_files):
), "Should have 2 partitions [(CSV1, CSV2), (CSV3)] since the first merge is above the minimum (>0 bytes)"


@pytest.mark.skipif(os.getenv("DAFT_MICROPARTITIONS", "1") == "0", reason="Test can only run on micropartitions")
def test_merge_scan_task_below_min(csv_files):
with override_merge_scan_tasks_configs(35, 40):
df = daft.read_csv(str(csv_files))
Expand Down

0 comments on commit 5285b12

Please sign in to comment.