Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and fmaussion committed May 3, 2022
1 parent 416adfc commit 34a38b1
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions xarray/tests/test_formatting.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
import xarray as xr
from xarray.core import formatting

from . import (
requires_netCDF4,
requires_dask,
)
from . import requires_dask, requires_netCDF4


class TestFormatting:
Expand Down Expand Up @@ -435,12 +432,13 @@ def test_array_scalar_format(self) -> None:
assert "unsupported format string passed to" in str(excinfo.value)

# also check for dask
var = var.chunk(chunks={'dim_0': 1})
var = var.chunk(chunks={"dim_0": 1})
assert var.__format__("") == "[0.1 0.2]"
with pytest.raises(TypeError) as excinfo:
var.__format__(".2f")
assert "unsupported format string passed to" in str(excinfo.value)


def test_inline_variable_array_repr_custom_repr() -> None:
class CustomArray:
def __init__(self, value, attr):
Expand Down

0 comments on commit 34a38b1

Please sign in to comment.