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

Skip all grib tests for Python 3. #1833

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 8 additions & 2 deletions lib/iris/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -810,8 +810,14 @@ class MyPlotTests(test.GraphicsTest):
return skip(fn)


skip_grib = unittest.skipIf(not GRIB_AVAILABLE, 'Test(s) require "gribapi", '
'which is not available.')
if six.PY3:
skip_grib = unittest.skipIf(
True,
'Test(s) use "grib", which is not currently supported under Python 3.')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why grib instead of gribapi?

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


def no_warnings(func):
Expand Down
11 changes: 8 additions & 3 deletions lib/iris/tests/runner/_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import glob
import multiprocessing
import os
import six
import sys


Expand Down Expand Up @@ -181,9 +182,13 @@ def run(self):
args = ['', None, '--processes=%s' % n_processors,
'--verbosity=2', regexp_pat,
'--process-timeout=250']
try:
import gribapi
except ImportError:
gribapi = None
if six.PY2:
try:
import gribapi
except ImportError:
pass
if not gribapi:
args.append('--exclude=^grib$')
if self.stop:
args.append('--stop')
Expand Down