Skip to content

Conversation

micahcochran
Copy link
Contributor

If you do not have netCDF4 installed, some example tests will give ImportErrors.

This patch makes netCDF4 optional for run_all.py. It imports netCDF4, if that package is not available, it removes tests that require netCDF4.

There may be some of the tests in the lines above the try-statement that could be put below the except-statement. I did not look at that aspect.

If you do not have netCDF4 installed, some tests will give ImportErrors.

This patch makes netCDF4 optional for run_all.py.  It imports netCDF4, if that package is not available, it removes tests that require netCDF4.

There may be some of the tests in the lines above the try-statement that could be put below the except-statement.  I did not look at that aspect.
@WeatherGod
Copy link
Member

Could you include a message stating that some tests are being removed due to the netCDF4 package not being importable?

@micahcochran
Copy link
Contributor Author

Are you wanting me to print that message for the user? Or are you wanting me to make this comment "# remove tests requiring netCDF4" a little more descriptive?

@WeatherGod
Copy link
Member

a message to the user so that they know that not all of the tests are being
executed. It can be a simple print function rather than using the warning
module.

On Mon, Nov 30, 2015 at 4:01 PM, Micah Cochran notifications@github.com
wrote:

Are you wanting me to print that message for the user? Or are you wanting
me to make this comment "# remove tests requiring netCDF4" a little more
descriptive?


Reply to this email directly or view it on GitHub
#233 (comment).

WeatherGod added a commit that referenced this pull request Dec 14, 2015
makes netCDF4 optional for examples/run_all.py
@WeatherGod WeatherGod merged commit 430ddfc into matplotlib:master Dec 14, 2015
@micahcochran
Copy link
Contributor Author

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants