Skip to content

Commit

Permalink
Removed grib-specific test to iris-grib. (SciTools#3671)
Browse files Browse the repository at this point in the history
  • Loading branch information
pp-mo authored and tkknight committed Jun 29, 2020
1 parent ff25b17 commit 0dd3d9b
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions lib/iris/tests/integration/test_pickle.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,9 @@
import iris.tests as tests

import pickle
import unittest

import iris

if tests.GRIB_AVAILABLE:
from iris_grib.message import GribMessage


class Common:
def pickle_cube(self, protocol):
Expand All @@ -39,44 +35,6 @@ def test_protocol_2(self):
self.pickle_cube(2)


@tests.skip_data
@tests.skip_grib
class TestGribMessage(Common, tests.IrisTest):
def setUp(self):
self.path = tests.get_data_path(("GRIB", "fp_units", "hours.grib2"))

def pickle_obj(self, obj):
with self.temp_filename(".pkl") as filename:
with open(filename, "wb") as f:
pickle.dump(obj, f)

# These probably "ought" to work, but currently fail.
# see https://github.com/SciTools/iris/pull/2608
@unittest.expectedFailure
def test_protocol_0(self):
super().test_protocol_0()

@unittest.expectedFailure
def test_protocol_1(self):
super().test_protocol_1()

@unittest.expectedFailure
def test_protocol_2(self):
super().test_protocol_2()

def test(self):
# Check that a GribMessage pickles without errors.
messages = GribMessage.messages_from_filename(self.path)
obj = next(messages)
self.pickle_obj(obj)

def test_data(self):
# Check that GribMessage.data pickles without errors.
messages = GribMessage.messages_from_filename(self.path)
obj = next(messages).data
self.pickle_obj(obj)


@tests.skip_data
class test_netcdf(Common, tests.IrisTest):
def setUp(self):
Expand Down

0 comments on commit 0dd3d9b

Please sign in to comment.