Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed grib-specific test to iris-grib. #3671

Merged
merged 1 commit into from
Feb 24, 2020
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
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