Skip to content

Commit 3b394a4

Browse files
committed
Further removals.
1 parent 6f11be2 commit 3b394a4

11 files changed

Lines changed: 7 additions & 206 deletions

File tree

lib/iris/fileformats/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
#
7373
def _load_grib(*args, **kwargs):
7474
if igrib is None:
75-
raise RuntimeError('Unable to load GRIB file - the ECMWF '
76-
'`gribapi` package is not installed.')
75+
raise RuntimeError('Unable to load GRIB file - '
76+
'`iris_grib` is not installed.')
7777
return igrib.load_cubes(*args, **kwargs)
7878

7979

lib/iris/tests/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1117,7 +1117,7 @@ class MyPlotTests(test.GraphicsTest):
11171117
return skip(fn)
11181118

11191119

1120-
skip_grib = unittest.skipIf(not GRIB_AVAILABLE, 'Test(s) require "gribapi", '
1120+
skip_grib = unittest.skipIf(not GRIB_AVAILABLE, 'Test(s) require "iris_grib", '
11211121
'which is not available.')
11221122

11231123

lib/iris/tests/integration/format_interop/test_pp_grib.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# (C) British Crown Copyright 2014 - 2015, Met Office
1+
# (C) British Crown Copyright 2014 - 2017, Met Office
22
#
33
# This file is part of Iris.
44
#
@@ -25,9 +25,6 @@
2525

2626
import iris
2727

28-
if tests.GRIB_AVAILABLE:
29-
import gribapi
30-
3128

3229
@tests.skip_grib
3330
class TestBoundedTime(tests.IrisTest):

lib/iris/tests/integration/test_pickle.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,6 @@
2626
import six.moves.cPickle as pickle
2727

2828
import iris
29-
if tests.GRIB_AVAILABLE:
30-
import gribapi
31-
from iris.fileformats.grib.message import GribMessage
32-
33-
34-
@tests.skip_data
35-
@tests.skip_grib
36-
class TestGribMessage(tests.IrisTest):
37-
def test(self):
38-
# Check that a GribMessage pickles without errors.
39-
path = tests.get_data_path(('GRIB', 'fp_units', 'hours.grib2'))
40-
messages = GribMessage.messages_from_filename(path)
41-
message = next(messages)
42-
with self.temp_filename('.pkl') as filename:
43-
with open(filename, 'wb') as f:
44-
pickle.dump(message, f)
45-
46-
def test_data(self):
47-
# Check that GribMessage.data pickles without errors.
48-
path = tests.get_data_path(('GRIB', 'fp_units', 'hours.grib2'))
49-
messages = GribMessage.messages_from_filename(path)
50-
message = next(messages)
51-
with self.temp_filename('.pkl') as filename:
52-
with open(filename, 'wb') as f:
53-
pickle.dump(message.data, f)
5429

5530

5631
class Common(object):

lib/iris/tests/results/system/supported_filetype_.grib2.cml

Lines changed: 0 additions & 45 deletions
This file was deleted.

lib/iris/tests/results/unit/fileformats/grib/load_cubes/load_cubes/reduced_raw.cml

Lines changed: 0 additions & 45 deletions
This file was deleted.

lib/iris/tests/results/uri_callback/grib_global.cml

Lines changed: 0 additions & 57 deletions
This file was deleted.

lib/iris/tests/stock.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# (C) British Crown Copyright 2010 - 2016, Met Office
1+
# (C) British Crown Copyright 2010 - 2017, Met Office
22
#
33
# This file is part of Iris.
44
#
@@ -552,9 +552,3 @@ def realistic_4d_w_missing_data():
552552
aux_coords_and_dims=[(forecast_period, 0)],
553553
attributes={'source':'Iris test case'})
554554
return cube
555-
556-
557-
def global_grib2():
558-
path = tests.get_data_path(('GRIB', 'global_t', 'global.grib2'))
559-
cube = iris.load_cube(path)
560-
return cube

lib/iris/tests/test_coding_standards.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -309,8 +309,7 @@ def test_license_headers(self):
309309
'docs/iris/src/developers_guide/gitwash_dumper.py',
310310
'docs/iris/build/*',
311311
'lib/iris/analysis/_scipy_interpolate.py',
312-
'lib/iris/fileformats/_pyke_rules/*',
313-
'lib/iris/fileformats/grib/_grib_cf_map.py')
312+
'lib/iris/fileformats/_pyke_rules/*',)
314313

315314
try:
316315
last_change_by_fname = self.last_change_by_fname()

lib/iris/tests/test_io_init.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ def test_decode_uri(self):
5555

5656

5757
class TestFileFormatPicker(tests.IrisTest):
58-
@tests.skip_grib
5958
def test_known_formats(self):
6059
self.assertString(str(iff.FORMAT_AGENT),
6160
tests.get_result_path(('file_load',

0 commit comments

Comments
 (0)