Skip to content

Commit

Permalink
Reuse fixtures in tpch.conftest from test_polars [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
milesgranger committed Oct 13, 2023
1 parent d14e1a9 commit f308a10
Showing 1 changed file with 1 addition and 36 deletions.
37 changes: 1 addition & 36 deletions tests/benchmarks/tpch/test_polars.py
Original file line number Diff line number Diff line change
@@ -1,44 +1,9 @@
import functools
from datetime import datetime

import coiled
import polars as pl
import pytest
from pyarrow.dataset import dataset

from tests.benchmarks.tpch.conftest import DATASETS, ENABLED_DATASET

machine = {
"memory": "256 GiB",
}


@pytest.fixture(scope="module")
def warm_start():
@coiled.function(**machine)
def _():
pass

_() # run once to give us a warm start


@pytest.fixture(scope="function")
def restart(warm_start):
@coiled.function(**machine)
def _():
pass

_.client.restart()
yield


def coiled_function(**kwargs):
# Shouldn't be necessary
# See https://github.com/coiled/platform/issues/3519
def _(function):
return functools.wraps(function)(coiled.function(**kwargs, **machine)(function))

return _
from tests.benchmarks.tpch.conftest import DATASETS, ENABLED_DATASET, coiled_function


def read_data(name, source=None):
Expand Down

0 comments on commit f308a10

Please sign in to comment.