Skip to content
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions lib/iris/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1033,6 +1033,13 @@ class MyPlotTests(test.GraphicsTest):
return skip(fn)


# Control for @skip_biggus : Set to False to run the biggus-dependent tests.
_SKIP_BIGGUS_DEPENDENT_TESTS = True

skip_biggus = unittest.skipIf(_SKIP_BIGGUS_DEPENDENT_TESTS,
reason='Test(s) assume biggus in place of dask.')


skip_grib = unittest.skipIf(not GRIB_AVAILABLE, 'Test(s) require "gribapi", '
'which is not available.')

Expand Down
41 changes: 41 additions & 0 deletions lib/iris/tests/unit/test_skip_biggus.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# (C) British Crown Copyright 2017, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Iris is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with Iris. If not, see <http://www.gnu.org/licenses/>.
"""
Check operation of @skip_biggus.

"""
from __future__ import (absolute_import, division, print_function)
from six.moves import (filter, input, map, range, zip) # noqa

# Import iris.tests first so that some things can be initialised before
# importing anything else.
import iris.tests as tests

from iris.tests import skip_biggus


class TestSkipBiggus(tests.IrisTest):
# Test always fails, unless skipped.
# To check, set tests._SKIP_BIGGUS_DEPENDENT_TESTS = False,
# then this test should fail.
@skip_biggus
def test_fail(self):
self.assertTrue(False)


if __name__ == '__main__':
tests.main()