diff --git a/examples/run_all.py b/examples/run_all.py index 72a9b62e8..96e80abf8 100644 --- a/examples/run_all.py +++ b/examples/run_all.py @@ -12,6 +12,17 @@ test_files.remove('plothighsandlows.py') # requires scipy test_files.remove('lic_demo.py') test_files.remove('testwmsimage.py') +try: + from netCDF4 import Dataset +except ImportError: + # remove tests requiring netCDF4 + sys.stdout.write("Could not import netCDF4, skipping tests that require netCDF4.\n") + test_files.remove('streamplot_demo.py') + test_files.remove('plotprecip.py') + test_files.remove('test_rotpole.py') + test_files.remove('ccsm_popgrid.py') + test_files.remove('ploticos.py') + py_path = os.environ.get('PYTHONPATH') if py_path is None: py_path = '.'