Skip to content

Commit 831aa91

Browse files
authored
Use new Cubed raise_if_computes testing function (#43)
1 parent 97c800e commit 831aa91

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

cubed_xarray/tests/test_xarray.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import pandas as pd
1414
import pytest
1515
import xarray as xr
16+
from cubed import raise_if_computes as raise_if_cubed_computes
1617
from xarray import DataArray, Dataset, Variable
1718
from xarray.tests import (
1819
assert_allclose,
@@ -22,15 +23,7 @@
2223
mock,
2324
)
2425

25-
try:
26-
from cubed.testing import raise_if_computes as raise_if_cubed_computes
27-
except ImportError:
28-
from contextlib import nullcontext
2926

30-
raise_if_cubed_computes = nullcontext
31-
32-
33-
@pytest.mark.xfail(reason="needs https://github.com/cubed-dev/cubed/pull/545")
3427
def test_raise_if_cubed_computes():
3528
data = cubed.from_array(np.random.RandomState(0).randn(4, 6), chunks=(2, 2))
3629
with pytest.raises(RuntimeError, match=r"'compute' was called"):

0 commit comments

Comments
 (0)