Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions lib/iris/tests/unit/fileformats/rules/test__make_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@
# See LICENSE in the root of the repository for full licensing details.
"""Unit tests for :func:`iris.fileformats.rules._make_cube`."""

from unittest import mock

import numpy as np
import pytest

from iris.fileformats.rules import ConversionMetadata, _make_cube


class Test:
def test_invalid_units(self):
def test_invalid_units(self, mocker):
# Mock converter() function that returns an invalid
# units string amongst the collection of other elements.
factories = None
Expand All @@ -36,10 +34,10 @@ def test_invalid_units(self):
dim_coords_and_dims,
aux_coords_and_dims,
)
converter = mock.Mock(return_value=metadata)
converter = mocker.Mock(return_value=metadata)

data = np.arange(3.0)
field = mock.Mock(
field = mocker.Mock(
core_data=lambda: data, bmdi=9999.0, realised_dtype=data.dtype
)

Expand Down
Loading