Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
pp-mo committed Jun 17, 2022
1 parent 16148e3 commit 4cab4e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
import iris.fileformats._nc_load_rules.engine
from iris.fileformats.cf import CFReader
import iris.fileformats.netcdf
from iris.fileformats.netcdf import _load_cube
from iris.fileformats.netcdf.loader import _load_cube
from iris.tests.stock.netcdf import ncgen_from_cdl

"""
Expand Down Expand Up @@ -83,11 +83,11 @@ def load_cube_from_cdl(self, cdl_string, cdl_path, nc_path):
# Grab a data variable : FOR NOW always grab the 'phenom' variable.
cf_var = cf.cf_group.data_variables["phenom"]

engine = iris.fileformats.netcdf._actions_engine()
engine = iris.fileformats.netcdf.loader._actions_engine()

# If debug enabled, switch on the activation summary debug output.
# Use 'patch' so it is restored after the test.
self.patch("iris.fileformats.netcdf.DEBUG", self.debug)
self.patch("iris.fileformats.netcdf.loader.DEBUG", self.debug)

with warnings.catch_warnings():
warnings.filterwarnings(
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/tests/unit/fileformats/netcdf/test_Saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ def test_big_endian(self):

def test_zlib(self):
cube = self._simple_cube(">f4")
api = self.patch("iris.fileformats.netcdf.netCDF4")
api = self.patch("iris.fileformats.netcdf.saver.netCDF4")
# Define mocked default fill values to prevent deprecation warning (#4374).
api.default_fillvals = collections.defaultdict(lambda: -99.0)
with Saver("/dummy/path", "NETCDF4") as saver:
Expand Down

0 comments on commit 4cab4e2

Please sign in to comment.